"Pause" code (1 Viewer)

Hello1

Registered User.
Local time
Today, 12:30
Joined
May 17, 2015
Messages
271
Hi guys,

I have a continuous form with few records, and every record has a button. When I click on that button a piece of code is started which creates an .xml file, after the .xml file is successfully created it updates a check box to true, so the user knows its created and prevents him from creating it again.

Now what I want is a line of code before the file is created to open a report (pop-up one) which contains all the items which will be in the .xml file so the user can see the report and then a msg box vbYesNo would pop-up asking if everything looks alright, if vbYes then the xml file would create normally, if vbNo then I would stop the creation and delete the current record.

The problem is that the user cant use the report to see everything on it (zoom in and other stuff) when the msgbox appears. Is there a way to pause the code when the report opens and maybe continue when it closes?
Or another solution, Im open for suggestions :)

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:30
Joined
Oct 29, 2018
Messages
21,454
Hi. Yes. You could try opening the report in Dialog mode. For example:
Code:
DoCmd.OpenReport "ReportName", acViewPreview, , , acDialog
Hope it helps...
 

Micron

AWF VIP
Local time
Today, 05:30
Joined
Oct 20, 2018
Messages
3,478
and you could put a button in the report header to be clicked if everything is OK, thus forget about the popup message box that's covering the report.
 

Hello1

Registered User.
Local time
Today, 12:30
Joined
May 17, 2015
Messages
271
I went with the acDialog option, seems like what I need.
Micron, I might do that.

Thanks guys!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:30
Joined
Oct 29, 2018
Messages
21,454
I went with the acDialog option, seems like what I need.
Micron, I might do that.

Thanks guys!
Hi. You're welcome! Micron and I were happy to assist. Good luck with your project.
 

Users who are viewing this thread

Top Bottom