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!

Answering Yes/No to dialog boxes 3

Status
Not open for further replies.

izzyq

MIS
Mar 13, 2002
38
CA
When running macros that cause dialog boxes to come that require you to answer yes or no to move on, is there a way to get a piece of code in there that will automatically answer yes?

In my case, I'm running an openquery macro on a "make table" query. It will (1) tell me that I will be modifying data and if would like to continue. (2)It will then tell me that the current table will be deleted. (3)It then tells that it will paste "x" number of rows to the new table. I would like, if possible, to answer "yes" to all of these questions.

Help Me Obi Wan Kenobi, You're My Only Hope.
 
Did you try a SetWarnings OFF before your steps? Just make sure you set it back to ON when you are done... Terry
 
I use this for the same effect that Terry mentions...

Code:
DoCmd.SetWarnings False

and to turn them back on after you have run your queries exported the file or whatever you are doing...

Code:
 DoCmd.SetWarnings True

-Dan
 

Thanks Terry and Dan, both of these worked wonderfully Help Me Obi Wan Kenobi, You're My Only Hope.
 
Another meethod is to goto Tools>Option. From the Option s dialog box, select the Edit/Find tab, select which confirm check box that says "Actions Queries"

Hope this help in the feture.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top