I have a modal/popup Main form with a command button to open a second form in modal/popup mode. The second form has a command button to Preview a report. The command button code sequence is:
Mainform.visible=false
Popupform.visible=false
OpenReport in Preview mode
DoEvents loop until report is closed
Mainform.visible=true
Popupform.visible=true
My problem is I can not make both forms visible again. Which ever form is set to visible first is the only form which is made visible. I’ve tested this by rearranging the order of two visible=true statements. I’ve also tried Docmd.Openform instead of setting the visible property and get the same result, only the form in the first statement is visible.
I can get around this by setting the visible property in the Close event of the Popup form, but it seems like I should be able to do it all in one place. Is there something I need to do between the two visible=true statements?
Marty