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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dialog box

Status
Not open for further replies.

mikeasa

Technical User
Dec 23, 2005
133
US
How can I force module to continue to next step when a dialog box open with a yes , no, cancel button
 
I do not think that you can. Any form that opens as a dialog window halts execution, and as far as I know there is no why to change that on a standard message box. You could build your own form to emulate this, and if it is not dialog then code execution would continue.
 
Why are you using a dialog form for a simple Yes / no Cancel ????

I might be missing something, but why not use a standart message box... It has the behavior you suggested..

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
I believe he is using a standard MsgBox w/ vbYesNoCancel. The trouble is that MsgBox dialogues are basically modal, requiring user input before the code will continue.

I believe the solution is exactly what MajP suggested. Create an unbound form to emulate a vbYesNoCancel box, and as long as the forms Modal property is set to no, it should allow code to continue executing even if the user hasn't interacted with the form.


~Melagan
______
"It's never too late to become what you might have been.
 
I guess I have misread, but I don't quite get why he needs to keep the code running if he prompts user for a question... ?????

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
I may not have explained it correctly but what i needed was this "DoCmd.Setwarnings False" at beginning of procedure and "DoCmd.Setwarnings True" where I want box to popup

Thank you for your help
 
glad you figured ur problem out, we were all in the woods from your first post I guess

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
If you're running action queries, try using the Execute method instead of DoCmd.RunSQL or DoCmd.OpenQuery. Syntax would be like..

CurrentDB.Execute(SQL)

You don't have to set warnings off and on with that method.

~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top