Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for field value as macro condition

Status
Not open for further replies.

JustLJ

MIS
Oct 15, 2002
70
US
Greetings.

Trying to set up a macro condition, so that if the value of a particular field in a table is "match" then that line of the macro will run.

I can't seem to get this to take table![tblname]![fieldname] = "match"; like the syntax shows for forms or reports.

I'd like to keep this as a macro condition so someone else can take over ownership/maintenance of this application.

IF the best way is a UDF, then I'll need some guidence on doing it to return a TRUE condition for the macro.

Thanks!
LJ
 
Worked out an answer based on bits and pieces I found around here...

In the macro Condition field:

DLookUp("[CompareField]","[tblName]","[CompareField] = 'not' ") Is Not Null

_____________________________________
(means that the compare field is equal to 'not')

And for the action, do whatever you want to happen (in my case, runcode to do a bunch of system things).

Thanks everyone for being here on Tek-Tips for me.
LJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top