PDA

View Full Version : Timed Events



CreganTur
05-13-2008, 12:57 PM
this is a simple request, I imagine, but I can't find any good documentation on it.

All I want is for a message box to appear every Wednesday at 3:00.:think:

Carl A
05-13-2008, 04:24 PM
You could write a windows scripting host file and schedule it with windows Task Scheduler. Something like this


<package>
<job id="vbs">
<script language="VBScript">
msgbox "Time"
</script>
</job>
</package>

OBP
05-15-2008, 03:18 AM
Do you mean in Access or as Carl A suggests in Windows?

CreganTur
05-15-2008, 05:16 AM
Do you mean in Access or as Carl A suggests in Windows?

In Access.

Carl A
05-15-2008, 03:34 PM
All I want is for a message box to appear every Wednesday at 3:00.:think:

IMHO::think:

This is doable using the Timer but if all you want is to display a message box at a certain time then the added overhead is not worth using the Timer. Even if you are wanting the user to backup, compact or to perform some other task relating to the database. These task normally can be accomplished by creating another database to perform the tasks and once again use the Windows Task Scheduler to launch the database to perform them.

HTH:

OBP
05-16-2008, 04:33 AM
It is quite straightforward to do what you want. providing the database is open at 3.00(pm) on Wednesday.
I would have a hidden form open when the database opens.
Check if it is Wednesday, if it isn't close the form.
If it is Wednesday use the Form's on timer to check the system time and as close to 3.00 as possible display the message (or carry out an action if it would be better).
The only problem with doing this is that the on timer check may slow down the other processes that you might be carrying out in the database.