Macro Temp Variable

  • Thread starter Thread starter Ananth
  • Start date Start date
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.
 
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.
 
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
 
Sorry for not being specific.

The variable defined in the Macro is to be used in the data returned by the
query.
 
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
 
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
 
Back
Top