DoCmd.SetWarnings Problem

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
 
D

Douglas J. Steele

Try using

CurrentDb.QueryDefs("ab2").Execute dbFailOnError
CurrentDb.QueryDefs("ab3").Execute dbFailOnError
 
G

Guest

hmm, it works, thank you.

Douglas J. Steele said:
Try using

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top