I suppose no other method exists to halt code execution until the Form is closed?
Depends on what you want to do. I assume you want to open the form, do something, then run some code when the form closes.
You could possibly use withevents and a custom event. Make sure your pop up has the HasModule property set to yes.
This is aircode. It all goes in your calling form. Edit the name of popup as needed.
Code:
Dim WithEvents MyForm as access.form
Private sub SomeButton_Click()
Docmd.OpenForm "YourPopUpFormName"
Set MyForm = Forms("YourPopUpFormName")
MyForm.OnClose = "[Event Procedure]"
End Sub
Private Sub MyForm_Close()
'Run your code here.
Set MyForm = Nothing
End Sub
EDIT: I should also tell you don't open as dialog, set the modal property of the pop up to yes.
If this helped, please click the star * at the bottom left and add to my reputation- Thanks