criteria referencing a global variable

  • Thread starter Thread starter dchendrickson
  • Start date Start date
D

dchendrickson

I am using Access2002 / XP Pro.

I have developed a query that needs to use the value of a
global variable as one of its criteria.

My current approach is to place a function call in the
query criteria and have that function return the value of
the global variable.

Is this the recommended way to retrieve a variable or is
there syntax that will reference the global variable
directly? I tried [module_name]![global_variable_name] in
the criteria line, but that did not work.

It is working as I have it, so maybe I should leave it
alone, but I wanted to ask.

Thanks,

-dc
 
You are doing it the way it needs to be done. There is no simple way to use a
global variable in a query.
 
Thanks.
-----Original Message-----
You are doing it the way it needs to be done. There is no simple way to use a
global variable in a query.
I am using Access2002 / XP Pro.

I have developed a query that needs to use the value of a
global variable as one of its criteria.

My current approach is to place a function call in the
query criteria and have that function return the value of
the global variable.

Is this the recommended way to retrieve a variable or is
there syntax that will reference the global variable
directly? I tried [module_name]![global_variable_name] in
the criteria line, but that did not work.

It is working as I have it, so maybe I should leave it
alone, but I wanted to ask.

Thanks,

-dc
.
 
Back
Top