Wait on a response from a form.

  • Thread starter Thread starter Kent
  • Start date Start date
K

Kent

I know I've done this before. I just can't remember
how. I've got a coded loop and I want to open a form and
have the user fill in some data if the code finds some
missing data. I need the loop to stop executing until
the user responds on the form. After the response, have
the loop continue. That's the general idea. This has to
be done quite a bit.

Looking forward to a response.

Thanks,
 
In the DoCmd.OpenForm call set the Window Mode argument to acDialog. This
will pause the code until the form is closed or hidden.
 
Have the calling code open the form in dialog mode. This
halts the calling code until the form is closed or
hidden. Then, to retrieve the values, have the 'ok' or
whatever button on the form set its visible property to
false. The calling code will resume and you can retrieve
the values entered by the user, then programatically close
the form.

Hope this helps!

- Scott
 
Back
Top