Global Parameter

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
 
N

Nikos Yannacopoulos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top