Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to send reports.

Status
Not open for further replies.

sunnywink

Technical User
Oct 6, 2002
49
0
0
FR
Hi all,

I am tasked to set up a Macro to send out reports at the end of the day.

Does anyone has idea if the Access program (97 Version) can recognise the system time, and trigger the Macro to send automatically at a specified time?

Any help will be appreciated.

Thanks.
 
You could use the Task Scheduler to launch the Access application at a specified time. The Access application should have a startup form to launch the procedure on Load or an AutoExec macro...

Good luck



[pipe]
Daniel Vlas
Systems Consultant

 
Hi

Thanks for your reply. However is there a way to trigger the macro from the Access program itself?

This is because the program will be sent to users aboard and we are unable to access to their task scheduler. Can the Access program recognise the computer system time?

or do you know of any websites where I can learn more of this?

Thanks.

 
Create a form with a Timer Interval set to 60000 (1 minute)
The OnTimer event procedure should:
-check for the time
-if the time is right, reset the TimerInterval to 0
-launch the macro
-set the timer interval back to 60000
-if not, do nothing

You may need a variable to hold the sending date so that the program knows NOT to trigger the macro after it had run until the next day.

Set the Visible proerty of the form to False and leave it open at all times.

The Access program must be running, otherwise it has no way of knowing anything. And it can't open by itself.

You could instruct users how to use the Task Scheduler.

HTH


[pipe]
Daniel Vlas
Systems Consultant

 
thanks for your help. I will try out your suggestion. The users will be new to Access and it's best not to alert them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top