SetVariableValue

<< Click to Display Table of Contents >>

 

SetVariableValue

SetVariableValue(VarName, Value)

This 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) must be defined, which can be a number, a text, or a date and time. The next script contains an example of using this method.

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?