Run-away report!

Magster

Registered User.
Local time
Today, 02:38
Joined
Jul 30, 2008
Messages
115
Hi all,

I am calling a report from a form using the following VBA code:

docmd.OpenReport "rpt-05",acViewPreview,,,, "DownloadProcess"

In my report, I set Pop Up to No, and Modal to Yes. The report is created and displayed, but my code keeps on truckin...

I thought that the modal would make the code stop and wait until the user closed the report.

I also tried to use acDialog for the WindowMode in vba, and that worked the report stopped, but I had no way to print it.

Can anyone shove me in the right direction in order to make VBA wait until the user looks at the report?

I await an answer.....!!
 
Use the Dialog argument of the OpenReport command to do that.
 
I tried that too, but it didn't stop the code from continuing to process and display another report and form.

I created menu selections to view the reports instead - that's a way-around and I didn't solve my problem, but no more time to spend on it.

Thank you for your reponse, I appreciate it.
 
You used this code:
DoCmd.OpenReport "rpt-05", acViewPreview, , , acDialog, "DownloadProcess"
...and your code kept running? Something else is going on.
 
Hi - I agree - something else is going on...
 
Do you have a timer event running somewhere? That can cause some strange results at times. Maybe Compact and Repair and zip up your db and attach it to a post so we can look at it will help.
 

Users who are viewing this thread

Back
Top Bottom