K kon Nov 29, 2005 #1 How can I use in a query in design view in criteria a variable (A variable used in VBA code)?
K Ken Snell \(MVP\) Nov 29, 2005 #2 Create a public function (in a regular module) that reads the value of the variable -- note that the variable must be a global variable: Public Function GetMyVariable() GetMyVariable = NameOfTheVariable End Function Then call the function in your query using GetMyVariable().
Create a public function (in a regular module) that reads the value of the variable -- note that the variable must be a global variable: Public Function GetMyVariable() GetMyVariable = NameOfTheVariable End Function Then call the function in your query using GetMyVariable().