DateSerial in Macro Condition

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have a macro that runs several queries and produces some various reports. I
also have some set up for thier specific day (ie Monday, Tuesday etc) However
there are some that only get ran on the 22 of every month. I used the
following in the condition:

DateSerial(Year(Date()),Month(Date()),22)

Works find for queries but I cant get it to work for my macro condition.
Any help is much appreciated. Thanks & Cheers
 
Dan

If I recall correctly, a "condition" is a test (e.g., something = something
else).

I don't see any comparison in your expression...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Using DateSerial(Year(Date()),Month(Date()),22) the it runs the query
reguardless of the date.
If my understanding is correct it should run it if the date is the 22nd of
any month and any year, which is what I am looking for. Unless your
suggesting I use something like:

date()=DateSerial(Year(Date()),Month(Date()),22)
 
date()=DateSerial(Year(Date()),Month(Date()),22) Worked....Thanks Jeff for
getting the juices flowing. CHEERS!!! :)
 
Glad it worked out.

Consider also another approach. Instead of using the DateSerial() function,
if you know that the Day(Date()) = 22, that should trigger also, right?


Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top