Print report at SET time

DeepTrouble

Registered User.
Local time
Today, 16:46
Joined
Apr 24, 2001
Messages
18
I would like print a report AT SET TIME e.g.10:00, 12:00 and 16:30
Is there any suggestions to print a report Automatically?
Thanks for help
:)
 
You could set up a timer event to print the report.

This assumes you have a form open all the time.

The form has something like if time is less than 10.00 am then me.timer=5000. This starts the timer counting every five seconds.

In the timer event you would compare the time with something like

If Time>TimeSerial(10,00,00) then

Print My Report

Me.timer=0

End if
 
Alternativeely,

On the "On timer" event, check for a specific time of day having occurred to print your report.
 
Thanks a lot
I tried "On timer" but did not work as desired. The event is as follows
If Time > TimeSerial(10, 0, 0) Then
Print GCLog
Me.Timer = 10000
End If
Thanks
 
Now it works!Can I print a report ONCE in 24 HRS? I tried to set time interval, but it prints more often than necessary!
Thanks for your suggestions!
 
If you are using Win98, NT or newer, you can use the built in Scheduler to do what you want, and Access can be closed. It will open Access and run the Report. To accomplish this, you would create a Macro that Prints the report you want, and then use a Command line switch to run the Macro. I've got the exact command line information at work and can post it tomorrow A.M.
I think the switch is:
/x MacroNameHere

You would put this switch, the path to the database, and the path to the .exe file together like this:

"PathToDataBase" "PathToAccessExecutable"/Switch

An example would be

"C:\My Documents\MyDatabase.mdb" "C:\Program Files\Microsoft Office\Office\MSACCESS.exe"/x MacroNameHere

I've been using this for a couple years to run a daily report and it works great. You can play with this and I will post the corrected info in the A.M.

Paul
 
Here's the revised info if you want to try it. The application is called Task Scheduler and you should find an icon on the lower right side of the Task bar. Double click on it and fill in the boxes based on the example below.
In the Run box, you put
"PathToDatabase"/xMacroNameHere
and in the Start In box you put the path to your .exe file. So my run box looks like this\

"C:\My Documents\WorkOrders.mdb"/xPriorityReport

and my Start In box is

"C:\Program Files\Microsoft Office\Office\MSACCESS.exe"

Then you set the time you want to run the report on the Schedule tab.

HTH
Paul
 
The time event did work! Thanks every one for help. Paul.. We are still om win 95 and hope to get update on your suggestion! I can try it only after update is complete! But thanks for a very practical soln.
:)
 

Users who are viewing this thread

Back
Top Bottom