Solved Requery report on timer (1 Viewer)

Tea

Member
Local time
Today, 13:31
Joined
Oct 30, 2020
Messages
51
Hello,

I have this problem with my report, that opens a form when i choose a line. The form is later opened but at some point (randomly) it switches back to my report. The report has a time interval set and also a procedure event on timer. The procedure just has a me.requery in it. Can it be that whenever somebody changes something in the report and then it requeries it switches back from the form to report?

Is it possible to requery the report only when the focus is set on the report? Maybe with an IF condition?

Or can it be a different cause for the problem?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:31
Joined
May 7, 2009
Messages
19,230
maybe, Kill the timer before Opening
the form:

Me.TimerInterval = 0
DoCmd.OpenForm ....


on the Activate Event of the report, re-enable the timer:

Me.TimerInterval = 1000
 

Tea

Member
Local time
Today, 13:31
Joined
Oct 30, 2020
Messages
51
maybe, Kill the timer before Opening
the form:

Me.TimerInterval = 0
DoCmd.OpenForm ....


on the Activate Event of the report, re-enable the timer:

Me.TimerInterval = 1000
Do I leave the Me.Requery on the On Timer Event? Will it requery if I only set the timerinterval on the Activate Event and leave out the On Timer Event?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:31
Joined
May 7, 2009
Messages
19,230
you do not need to delete anything.
you only need to Add those codes.
 

Users who are viewing this thread

Top Bottom