New record after report preview (1 Viewer)

Tupacmoche

Registered User.
Local time
Today, 07:22
Joined
Apr 28, 2008
Messages
291
Hi VBA Masters,


I have a button with the code DoCmd.OpenReport. This command is in a case statement that print/opens the appropriate report based on some conditions. In any event what, I need help with is code that will run after exiting the report preview. This is the code: DoCmd.GotoRecord, , acNewRec. Basically, after exiting the report preview, I want to start a new record and not go back to the record that, I was previewing. How can this be accomplished?:confused:
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:22
Joined
Aug 30, 2003
Messages
36,118
Untested by try adding that line after OpenReport, but add the acDialog argument to the OpenReport. That will make the code pause and wait for the report to be closed.
 

Users who are viewing this thread

Top Bottom