Refering to Global Variable in Query

Shaft

Registered User.
Local time
Today, 13:16
Joined
May 25, 2005
Messages
51
Hi All,

Can anybody tell me whether it is possible to use a global variable defined in a vb module as part of the criterea in a query, if not whether there is a work around.

I suppose I could temporarily write the data to a table and use it from there, I thought there would be less messing around this way though.

Cheers
 
I use a public function to return the public variable. This works in all aspects of a query.
Code:
Public MyPublicValue As Integer 

Public Function GetMyPublicValue() As Integer
    GetMyPublicValue = MyPublicValue
End Function

Used in a query like:
GetMyPublicValue()
 
Yeah good thinking. Thank you very much :D
 

Users who are viewing this thread

Back
Top Bottom