Global variables as criteria (1 Viewer)

x0reset

Registered User.
Local time
Yesterday, 19:08
Joined
Nov 14, 2005
Messages
52
Anyone know how to reference a global variable as criteria for a query?

I am currently using invisible text boxes on an intermediary form as criteria for my query and it works fine, but this solution seems inellegant and I'm looking for something a little smoother. I just need the correct syntax to reference a variable in the criteria section of a query.

Thanks!
 

x0reset

Registered User.
Local time
Yesterday, 19:08
Joined
Nov 14, 2005
Messages
52
Why is it you always find the solution the second after you post? It's fairly simple; just use a period instead of an exclamation point:

Reference a control:

[Forms]![MyForm]![MyControl]

Reference a variable:

[Forms]![MyForm].[MyVariable]

Dont I feel stupid.
 

Users who are viewing this thread

Top Bottom