How to stop...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a form which used to have 6 input boxes which asked questions we had
to have answers for. I decided that it would make more sense to gather this
information in one place. So I designed a form to collect the information.
It works great. However, after I open the form, processing just keeps going
on. I wanted it to stop and wait until they pressed the Submit button on the
form. It didn't. I solved the problem but it was annoying. Here is what I
did.

Me.opt0 = -1 ' Tell code to wait until options chosen

DoCmd.OpenForm "frmAliasOptions"

doEventLoop:
DoEvents

If Me.opt0 = -1 Then GoTo doEventLoop ' make it stop until options set.

I had to put code in the form frmAliasOptions to set the Me.opt0 control
value to 1.

Can some one tell me the proper way to do this?

Thanks for your help.
 
Hi, Steve.

Use the "acDialog" option with the "DoCmd.OpenForm" method to allow the user
to finish making all of the desired selections on the other form before
continuing processing on your current form.

Try:

DoCmd.OpenForm "frmAliasOptions", , , , , acDialog

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question, please sign in to Microsoft's
Online Community and mark these posts, so that all may benefit by filtering
 
Back
Top