Change Warning Messages

SteveF

Registered User.
Local time
Today, 06:14
Joined
Jul 13, 2008
Messages
218
Hi All.

My database is working nicely now, so the next step is to put in a few neat features if I can.

Is there any way of changing the warning messages that appear when I run an append or update query?

Many thanks for help.
 
You can switch them off by going to; Tools, then Options, then on the Edit/Find tab in the Confirm section uncheck the options for Record Changes and Action queries.
 
You can switch em off through the advance menu or programatically in VBA when they are ran and substitute your own with MsgBox. You can do a search on this site for Set Warnings for the VBA.

-dK
 
Of course, if you are executing the queries through VBA you don't even need to bother with changing the settings. You can use code like the following:
Code:
[COLOR="Navy"]If[/COLOR] MsgBox("Are you sure you want to run this query?", _
          vbYesNo [COLOR="navy"]Or[/COLOR] vbDefaultButton2) = vbYes [COLOR="navy"]Then[/COLOR]
    CurrentDb.Execute "MyQuery"
[COLOR="navy"]End If[/COLOR]
 

Users who are viewing this thread

Back
Top Bottom