DoCmd.SetWarnings Problem

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

Guest

Hi,
I've got a problem with DoCmd.SetWarnings command (Access 2000).
The code:
DoCmd.SetWarnings False
DoCmd.OpenQuery ("ab2")
DoCmd.OpenQuery ("ab3")
DoCmd.SetWarnings True

The queries do some updates on a table. I wanto to supress the warnings,
that some records would be updated. But I get the messages ("You are going to
update 2 Records.....) anyway?
Thanks for your help
 
Try using

CurrentDb.QueryDefs("ab2").Execute dbFailOnError
CurrentDb.QueryDefs("ab3").Execute dbFailOnError
 
Back
Top