View Full Version : How do you Pass a Global Variable to a query


ChampionDuy
05-08-2002, 11:42 AM
IS there a way to pass a global variable into a simple select query?

Pat Hartman
05-08-2002, 03:41 PM
You need to create a function to do it.

Public Function YourFuncName()
YourFuncName = someGlobalVariable
End Function

Then in the query:

...
Where YourField = YourFuncName();

ChampionDuy
05-22-2002, 11:18 AM
I created a Function

public Function EndDateFun()

EndDateFun = EndingDate

End Function

then in my query I put

Where ExpDate >= EndDateFun


and I got a error message saying that the Function was identified or could not find function.
What am I doing wrong? I would appreciate any help Sorry for the long Delay in response