Suppress dialog boxes for update queries.

  • Thread starter Thread starter Brown
  • Start date Start date
B

Brown

Access 2003. I have an update query that clears a checkbox. (The user
checks box for records to be printed, the last part of the "Print Selecte
Records" routine is to run the update query to clear the checks from all
boxes.) I don't want the user to see or have the need to respond about the
records being updated. How do I suppress this dialog box?

Brown
 
Brown,

How are you runnig the query? Macro or VBA code? If it's a macro,
precede the OpenQuery action with a SetWarnings action, argument False;
then supersede it with another SetWarnings, argument True to restore
warnings.

If you are running an SQL query in VBA code, like:

DoCmd.RunSQL strSQL

then change that to:

CurrentDb.Execute strSQL

If you are running a saved query in VBA code, then precede the
DoCmd.OpenQuery with a:

DoCmd.SetWarnigns False

and supersede it with a

DoCmd.SetWarnigns True

HTH,
Nikos
 
Back
Top