Macro Condition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I use the results of a query as a condition in a macro?
Can I use it in code? If yes, how?

Thanks
 
You cannot refer directly to the output of the query in the Condition of
your macro.

If there is just one field value that you want to know about, you could use
DLookup() to get that value from the query.

The Condition column of the macro would contain something like this:
IsNull(DLookup("MyField", "MyQuery"))

More info on DLookup():
http://members.iinet.net.au/~allenbrowne/casu-07.html
 
Thankyou
-----Original Message-----
You cannot refer directly to the output of the query in the Condition of
your macro.

If there is just one field value that you want to know about, you could use
DLookup() to get that value from the query.

The Condition column of the macro would contain something like this:
IsNull(DLookup("MyField", "MyQuery"))

More info on DLookup():
http://members.iinet.net.au/~allenbrowne/casu-07.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
Back
Top