Bigred,
One way to handle this...
1. Make a simple table, one text field, one record, and put last
month's date in there in format 0401
2. Make an Update Query which will update the value of this field to
Format(Date(),"yymm")
3. Include an OpenQuery action in your macro to run theis Update
4. Expand your macro Condition to include this, i.e.
Weekday(Date())=2 And Day(Date())<8 And
Format(Date(),"yymm")>DLookup("[YourField]","YourTable")
This way, the first time the database opens on the 1st Monday of the
month, the macro will run, and in the process will put reference to this
month in the lookup table, so the second time it is opened on that day,
the condition will then fail and therefore the macro will not run.
--
Steve Schapel, Microsoft Access MVP
_Bigred said:
Hello Steve,
The first point you make about holidays is not a problem, because even on
holidays we will be running this macro (if it works). But do you have any
ideas on how to get around the macro running (printing all reports) every
time you open the db, if it is the 1st monday of the month?
Any ideas would be greatly appreciated, I will try the condition you gave to
see how it works.
Thanks,
_Bigred