Macro Temp Variable

A

Ananth

Using the feature in the Macro (SetTempVar), I have created a variable called
MyVAR. Assigned a value of 2000.

I am running a Macro, which in turn runs 10 queries. In one of the queries,
I have to call the temporary variable MyVAR.

I am aware that when I run the query I can call the Variable using the ENTER
PARAMETER Value dialogue box.

I do I call the variable declared using SetTempVar in Macro.
 
A

Ananth

Ananth said:
Using the feature in the Macro (SetTempVar), I have created a variable called
MyVAR. Assigned a value of 2000.

I am running a Macro, which in turn runs 10 queries. In one of the queries,
I have to call the temporary variable MyVAR.

I am aware that when I run the query I can call the Variable using the ENTER
PARAMETER Value dialogue box.

How do I call the variable in the Query using the variable declared in SetTempVar in Macro.
 
S

Steve Schapel

Ananth,

What exactly do you mean by "call the variable" in the query? You want it
to be included in the data returned by the query? As part of a calculation?
Or as a criteria? Maybe you can give an example. Copy/paste the SQL view
of the query into your reply might help.

--
Steve Schapel, Microsoft Access MVP


Ananth said:
Using the feature in the Macro (SetTempVar), I have created a variable
called
MyVAR. Assigned a value of 2000.

I am running a Macro, which in turn runs 10 queries. In one of the
queries,
I have to call the temporary variable MyVAR.

I am aware that when I run the query I can call the Variable using the
ENTER
PARAMETER Value dialogue box.

I do I call the variable declared using SetTempVar in Macro.



__________ Information from ESET Smart Security, version of virus signature database 4222 (20090707) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
A

Ananth

Sorry for not being specific.

The variable defined in the Macro is to be used in the data returned by the
query.
 
S

Steve Schapel

Ananth,

You can use it in the query like this:
[TempVars]![MyVAR]

--
Steve Schapel, Microsoft Access MVP


Ananth said:
Sorry for not being specific.

The variable defined in the Macro is to be used in the data returned by
the
query.



__________ Information from ESET Smart Security, version of virus signature database 4222 (20090707) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
A

Ananth

Steve

Thanks very much.

Steve Schapel said:
Ananth,

You can use it in the query like this:
[TempVars]![MyVAR]

--
Steve Schapel, Microsoft Access MVP


Ananth said:
Sorry for not being specific.

The variable defined in the Macro is to be used in the data returned by
the
query.



__________ Information from ESET Smart Security, version of virus signature database 4222 (20090707) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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