SetVariableValue

<< Click to Display Table of Contents >>

 

SetVariableValue

SetVariableValue(VarName, Value)

The SetVariableValue method adjusts the value of a variable set in the Query, so that this value can be informed as a filter or parameter before performing the Query. The variable name (VarName) and the value (Value), which can be a number, a text, or a date and time must be defined. Example:

Sub CommandButton_Click()
  Set cons = Screen.Item("E3Browser1").Item("Query1")
  InitialDate = Now - 1
  FinalDate = Now
  cons.SetVariableValue "IniDate", InitialDate
  cons.SetVariableValue "EndDate", FinalDate
End Sub

Was this page useful?