Global Parameter

  • Thread starter Thread starter Hari
  • Start date Start date
H

Hari

Hi,

I'm executing multiple parametized queries within a macro.
All these queries take a single common parameter. Is there
a way to accept this parameter value once and pass on to
all queries?

TIA,
Hari
 
Hari,

One way to do it is to use a form with a textbox to hold the parameter
value, and have all queries read it from there. So, if your query criterion
is, for instance,
[Enter parameter value]

it wiould become
Forms!FormName!TextBoxName

Another way is to setup a global variable in code, assign the parameter
value to it, and then use a function in code to simply return the global
variable's value. The function can be used in the query criteria.

Assuming your parameter is manually entered by the user, the form option
seems to be the reasonable way to go.

HTH,
Nikos
 
Back
Top