Calling another Dialog box from an Event Proc

K

KennyF

I have a dialog box that has a number of list boxes that allow the user enter
data. One of the list boxes allows multiple selections. After pressing the
OK button, the Event for the button runs code that processes the data. If an
check button on the form is checked, I want to open another form to gather
additional information.
As In
Do While some condition
If CheckBox then
DoCmd.OpenForm("AnotherForm")
...
Endif
Loop

However, while the form opens, it does not get the focus, and the code
following the OpenForm command continues to run.
How do I stop and process the second form?
Thanks for your help
Ken
 
D

Douglas J Steele

Try

DoCmd.OpenForm "AnotherForm", , , , , acDialog

or

DoCmd.OpenForm FormName:="AnotherForm", WindowMode = acDialog
 
K

KennyF

Thank you, that is what I needed.

Douglas J Steele said:
Try

DoCmd.OpenForm "AnotherForm", , , , , acDialog

or

DoCmd.OpenForm FormName:="AnotherForm", WindowMode = acDialog
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top