Using Public Variable in a Query

AlexB

Registered User.
Local time
Today, 22:08
Joined
Mar 3, 2003
Messages
21
Is this possible?

I just need to be able to use a publicVariable as a criteria in a query.... how do I do this?

Cheers
 
The way I do this is to make a function in a module.

If I had a public variable with a name stored in it, for example, where the variable was called pstrUser, then I'd write the function like this:

Code:
Function qUser() As String
   qUser = pstrUser
End Function

Then, as criteria, I'd put the function:

qUser()
 

Users who are viewing this thread

Back
Top Bottom