Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wait for dialog form to close before carrying on

Status
Not open for further replies.

GaryRW

Programmer
Mar 8, 2002
67
GB
I really hope there is something simple that I'm missing here...

I'm running a client database and then producing standard docs via a mailmerge. When you select a document, a pop - up, modal form is opened which asks you to select options for the requested document, you then click OK and off it goes with the mailmerge

My problem is: how do I stop the code that opened the pop up form from continuing until you click ok on the pop - up form. (e.g. using a modal form stops the user from doing anything else, but my code just carries on anyway).

Any ideas - I'm sure this must be a (relatively) common problem but I can't find anything in the FAQ's

Thanks for your help
 
you need to Use acdialog in the openform windowmode argument

DoCmd.OpenForm formname,,,,acdialog

this will halt the code
 
Thanks BrainDead2 (no offence meant...)

I'd already tried that with no luck. I've just seen another thread which gave me:

While DialogForm.Visible
DoEvents
Wend

That works great, except for some reason the combo boxes on the form don't work now - they open but won't actually select any value you click on. Can still enter text in though. Any ideas????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top