How to halt code while form opens

V

VBAgroupie

Can anyone tell me how to keep code from running. My code opens a form as a
diaglog box which the user must perform a action. The next line of code
after the openform is an openquery. The openquery as for user input. The
form and opens and the userinput box for the query opens on the screen at the
same time. I don't want the openquery to run until the openform dialog form
is closed by the user. Any suggestions to halt/hold execution of the
openquery until the openform is closed by the user? Thanks!
 
J

Jörg Ackermann

Hi,

VBAgroupie schreibselte:
Can anyone tell me how to keep code from running. My code opens a
form as a diaglog box which the user must perform a action. The next
line of code after the openform is an openquery. The openquery as
for user input. The form and opens and the userinput box for the
query opens on the screen at the same time. I don't want the
openquery to run until the openform dialog form is closed by the
user. Any suggestions to halt/hold execution of the openquery until
the openform is closed by the user? Thanks!

Open the form modal by acDialog:

DoCmd.OpenForm "YourForm", acNormal, , , , acDialog

Acki
 
Top