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

Hiding a Macro's Dialogue Boxes

Status
Not open for further replies.

MilinPCH

Technical User
Jul 27, 2000
37
US
Hello,

I have created a macro that executes an append query and then a delete query. It is executed when the end user presses a button on a form. The macro works perfectly, except I don't want to confuse or labor the user with having to answer all of those "are you sure you want to do this" dialogue boxes and click "Yes" - is there a way in VBA I can code it to answer Yes to all dialogue boxes and make them invisible as the macro runs?

Thanks,
Milin
 
you should use

docmd.setwarnings false

it's what I used to make almost the same thing as you

I wish it helps!

RickBerem
 
Try the SetWarnings Method:

DoCmd.SetWarnings False
Code...Code...Code
DoCmd.SetWarnings True

You may also want to use this in conjunction with the Echo Method, such as:

DoCmd.Echo False
DoCmd.SetWarnings False
Code...Code...Code
DoCmd.SetWarnings True
DoCmd.Echo True

Hope this helps,
JW.
 
Alternatively, the setwarnings method can be accessed through the macro builder window and incorporated there

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top