Timed event???

wh00t

Registered User.
Local time
Today, 20:20
Joined
May 18, 2001
Messages
264
Hi

I am creating a database which will be used by a 24/7 logistics operation. There are reports which the users will require to print off daily, is there any way where I can automatically print a report say at 00.10am each day?
 
The only way I would know to make this happen would be through the timer event.

If you do not already have one, you would need to make a form that is open at all times. If you do not want anyone to see it, open it invisibly but be sure to force the user to close it before exiting the database. Set the timer interval for the form to something like a minute.

Then in the timer event, update the text box with the current system time every time it fires. Follow that with an if statement. If it is the correct time, print the reports.
 
Or, you can do this. On a form that will be open at all times, set the form's On Timer Event to this:

Dim tmReportTime as Time

tmReportTime = #00:10:00#
If tmReportTime = Time then
(put your print code here)
End If


Set the Timer interval to 1000 so it will keep in synch with the TIME function as it will have the seconds included too. You can probably modify it so it only deals with minutes, but I don't have time to test a variation.

BL
hth
 

Users who are viewing this thread

Back
Top Bottom