Updating records without warnings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to have VB update records in the DB without
displaying the typical warnings of an update query. How can I do this
prgramatically?

Thanks
 
Jim,

If you are using something like

DoCmd.RunSQL strSQL

Try this instead:

CurrentDb.Execute strSQL

which will not produce the warnings.


If you are simply running a saved action query by means of a
DoCmd.OpenQuery, then precede it with a

DoCmd.SetWarnings False

and make sure you reverse this with a

DoCmd.SetWarnings True

right after running the action query, or *all* warnings thereafter will be
suppressed for the rest of the session!


Ideally I would go with the first option (CurrentDb.Execute) even if it
means recosntructing the SQL expression for the saved query in the code.

HTH,
Nikos
 
Back
Top