Printing a report at specific times

K

Ken Curtis

Hi!
I work at the Raoul Wallenberg Centre (a residential group home in London,
Ontario). We have a general log (form) to record the days activities. There
is a report attached to this form.

I would like to have the report print automatically at a specific time of
the day (i.e. 11:30 pm) AND have it set to print reports only from a specific
date (i.e. today). In other words: print a report tonight at 11:30 that
includes only those entries with todays date.

Is this possible? And, assuming that it IS possible, how is it done?

Thanks!
 
K

Kari

Ken,

It should be very possible to do what you want, if your database is open
(e.g. if it is shut down when everyone goes home for the night it can't print
a report in the middle of the night).

I don't know exactly how to do it, but you may be able to modify the method
found at http://www.databasejournal.com/features/msaccess/article.php/3548586

That article outlines a way to logout users (I used it to log everyone out
at night so our automatic backup could run).

In a nutshell, this is how it works:
1. Open and hide a form that periodically checks for the logout flag

2. When flag is true, open and show the countdown form

3. Continue scanning to verify flag was not reset to false

4. Quit application at end of countdown.

1. You should be able to modify #1 to set the flag at a certain time (set a
text box =Now() for the current time, set another unbound textbox
(LogoutHour) to the time you want the report to print, another unbound
textbox (the flag) to =([LogoutHour]<=[CurrentHour]) And
([CurrentHour]<=([LogoutHour]+2))*
*The "+2" is so that if the timer isn't exactly at the right point when it's
checked it will still fire sometime between the time you set and 2 hours
later. This may need modification because you won't be shutting the database
down; you don't want the report to print multiple times.

2. You probably don't need the countdown form from #2 since you're just
printing the report. And you won't need steps #3 or 4.

I hope that helps. If you get stuck on specifics post back and I'll try to
help.

Kari
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top