Looping through report (1 Viewer)

Bumi66

New member
Local time
Today, 06:45
Joined
Jan 15, 2019
Messages
19
Hi everyone,
I have a report that I just want to loop through with a little wait time.
The report shows errors in red so when I see the 12 pages I can see the error
right away. As of now I have to hit the curser right button to loop through all the
pages.
Is there a way to do this automatically via VBA as soon as I open the view
to loop through all the pages with 1 sec pause in between the views.
I also ant to be able to stop the cycle by hitting any key.

This is my current code :

Private Sub Command85_Click()

DoCmd.OpenReport "qryDelivered2", acPreview, "", "", acNormal
DoCmd.RunCommand acCmdPreviewTwelvePages

End Sub

Thanks
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:45
Joined
Feb 19, 2002
Messages
43,275
Why not just create a report that shows only the errors?
 

Bumi66

New member
Local time
Today, 06:45
Joined
Jan 15, 2019
Messages
19
Why not just create a report that shows only the errors?
I want to see everything, I just want to run through everything and I also want to be able to stop it with a hit of a key
 

tvanstiphout

Active member
Local time
Today, 03:45
Joined
Jan 22, 2016
Messages
222
There is no built-in way to do that.
You could fall back on SendKeys. Always fraught with unintended consequences.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:45
Joined
Feb 19, 2002
Messages
43,275
I want to see everything, I just want to run through everything
Just make two reports. Actually, only one report with criteria will do the trick. Show all, show only errors.
 

Users who are viewing this thread

Top Bottom