Automatic Query Execution

debo33

Registered User.
Local time
Today, 05:53
Joined
Aug 8, 2003
Messages
18
I'm not sure how to solve my problem. Every month birthday cards are mailed to clients. I have created a query that reads from a form based on user input of "StartDate" and "EndDate".

1. Between [Forms]![frmDOB]![StartDate] And [Forms]![frmDOB]![EndDate]
2. report is then executed based on user entry.

However, I would like to create a query and/or a macro to automatically executes when the database opens identifying the current month's birthday (similar to a reminder that occurs withing 10 days of the month ending) and this information is sent to a report. Is this possible? Sample code or illustrations are welcomed.

Thank you in advance,

debo
 
You could create a macro called Autoexec and place your queries/Reports etc within it. This will run automatically every time the DB is opened. If you place the following...

Between DateSerial(Year(Date()),Month(Date()),1) And DateSerial(Year(Date()),Month(Date())+1,0)

in the criteria of your query,(under the date column), it will return only data for the present Month.

HTH
IMO
 
Last edited:

Users who are viewing this thread

Back
Top Bottom