PC Review


Reply
Thread Tools Rate Thread

Access 2007 Macro Conditions

 
 
David Weiss
Guest
Posts: n/a
 
      19th Oct 2009
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.
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      20th Oct 2009
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.

--
Steve Schapel, Microsoft Access MVP


"David Weiss" <David (E-Mail Removed)> wrote in message
news:C29EAF48-0669-46D5-ADF2-(E-Mail Removed)...
> 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.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro that works in Access 2003 does not work in Access 2007 Amato, Frank Microsoft Access Macros 3 8th Jan 2009 11:58 AM
Excel format in Output To Macro differs in Access 2007 and Access RC Microsoft Access Macros 0 25th Jul 2008 03:39 AM
Access 2007 Apply Filter Macro Conditions Bidders Microsoft Access Macros 0 28th Apr 2008 05:03 PM
2007 Macro conditions John Microsoft Access Macros 2 19th Dec 2007 12:17 PM
what macro action has replace the setvalue macro in Access 2007 =?Utf-8?B?TWFjcm8gaW4gQWNjZXNzIDIwMDc=?= Microsoft Access Macros 2 21st Feb 2007 05:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 PM.