Return to code after opening a from

S

Steve S

I have Form-A with CmdButton-B to execute code. In that code I need to Open
Form-X on line 12 of the code. Is there a way to return to Line 13 of the
code after closing Form-X?

steve
 
B

Barry Gilbert

Open the form in Dialog mode like this:

DoCmd.OpenForm "FormX", windowmode:=acDialog
Msgbox "Back to business!"

When it's opened in dialog mode, the code will pause until the form is
closed and then resume with the next line.

Barry
 
Top