Access 2007 Macro Conditions

  • Thread starter Thread starter David Weiss
  • Start date Start date
D

David Weiss

I am trying to set up a macro in Access 2007 to look at a table "UPDATE"; if
field "Date" equals today and field "Update Status" equals "Yes" the macro
should run the action RunSavedImportExport. It seems that the conditions will
only apply to a form or report. I am looking for any help or suggestions.

Thank you.
 
David,

"look at a table" doesn't really make sense, unless you specify which record
in the table.

If you mean to go ahead with the macro if *any* records in the table meet
your criteria, then enter the macro Condition like this:
DCount("*","UPDATE","[Date]=Date() And [Update Status]='Yes'")>0

By the way, as an aside, 'date' is a Reserved Word (i.e. has a special
meaning) in Access, and should not be used as the name of a field or
control.
 
Back
Top