Printing a Report on a Specific Day

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that will allow users to print specific reports by clicking on
a button. On one day of the week I need a somewhat different report to
print, but I don't want to add another button to the form. I would like the
macro to print the correct report by determining the day of the week from the
system clock. I have tried several differnt filtes, but can't seem to get
the correct syntax. Can someone point me in the right direction?
 
Kellogg,

You've probably already discovered how to use conditions in a macro...
if not, while in Macro design, run menu item View > Conditions. This
allows you to execute the action next to a condition only if the
condition is met.
Now, the way to determine the current day of week, is through the use of
function Weekday. So, if you want a different report on, say, Monday,
then you would do something like:

Condition Action
WeekDay(Date,0) = 1 OpenReport (report A)
WeekDay(Date,0) <> 1 OpenReport (report B)

HTH,
Nikos
 
I tried adding the condition, but when I save the macro it puts brackets
around the word date and gives me the error message "can't find the name
'Date' you entered in the expression".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top