Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run away report!

Status
Not open for further replies.

WantToKnowMore

Programmer
Apr 6, 2004
31
US
Hi all,

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

docmd.OpenReport "rpt-5",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.....!!
 
modal and popup does not stop the code execution only dialog as you pointed out.

Can you prompt the user on close of the report if they want to print?

 
Yes, I tried using message boxes to stop, but it didn't work so I just pulled the code out of vba and put them in the menu so the user can run then from there. It didn't solve the issue, but it is actually cleaner.

Thanks for your reply, I appreciated it.
 
You can add a MsgBox asking if they are done previewing.

Ni neart go cur le cheile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top