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!

How do I supress Access's message b

Status
Not open for further replies.

martiros

Technical User
Feb 1, 2003
113
US
How do I supress Access's message boxes with warnings like:
You are about to delete record or
You are about to append 3 records

Here is my Sub.
Each DoCmd.OpenQuery gives me 1 or 2 message boxes.
I'd like to have just 1 for the whole sub.

Private Sub cmdDelete_Click()

DoCmd.OpenQuery "qappClientsArchiveRestore"
DoCmd.OpenQuery "qappCangesArchivRestore"
Form_frmClients.Requery

DoCmd.OpenQuery "qdelCangesArchive"
DoCmd.OpenQuery "qdelClientsArchive"
Form_frmClientsArchive.Requery

End Sub

Thank you
 
Try DoCmd.SetWarnings = False before you run the queries.

Make sure you do a DoCmd.SetWarnings = True when finished.
Also, make sure you have a DoCmd.SetWarnings = True in
the error handler for the procedure you use it in (just
in case).

Regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top