Refresh question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report I would like to post on a video screen. The video screen is
hooked up to a laptop with the report open. It is a shared database. Is
there a way to refresh the report when a new record has been added to the
table from another computer? Thanks for your help!
 
Susie said:
I have a report I would like to post on a video screen. The video screen is
hooked up to a laptop with the report open. It is a shared database. Is
there a way to refresh the report when a new record has been added to the
table from another computer?


Report's are a static picture of your data at the time the
report is opened. To get the display updated, you have to
close the report and open it again.

I can not think of a way to automate that unless you use a
form with a timer event. The details of that might get kind
of messy depending on all kinds of details of your
application. Just be sure to close that form whenever you
are going to do anything at design time.
 
I created a form with a macro attached to the "On Timer" event to open the
report. I also put 5000 on the interval timer. But when I had someone add a
record, the report doesn't seem to update. Is the timer based on the form or
the report? If it is based on the form, how would I get around that and have
it refresh the report?
 
OK, I included a "close" statement in my macro before the open. What I think
is happening is that it doesn't re-open the report. If I close and then open
the report in the macro, it of course refreshes. The problem is that the
form appears temporarily before the report opens again. So it's not a
perfect solution. If you have any other ideas, I'd appreciate anything you
could give me. Thanks for your help.
 
The form must be open all the time that you want to
"refresh" the report. It sounds like you are opening the
form from somewhere in the report. You should open the form
from the database window, or better yet, from a main control
(switchboard?) form by using a button. The form's timer
event will then close the report and immediately (re)open
the report. You may need to use error trapping if the first
close causes an error. If so, you need to use VBA for the
timer event procedure because macros do not allow for
handling errors.

Don't forget that the TimerInterval amount is in
milliseconds (1000 per second). Your setting of 5 seconds
is way too short, how about a few minutes (3 minutes =
180000 milliseconds).
 
Back
Top