SetOptions("Confirm...) not working

M

Mark

A2000

I have import routines that do a lot of appending and deleting. First
I was using SetWarnings False to allow my vb code to run w/o system
warnings. However that function stopped working for unknown reasons
(both via code and macro).

I tried SetOption("Confirm Action Queries") False and it worked
initially but the confirm delete/append boxes are still popping up.
I've stepped through my code and it is indeed clearing the check box
on the options/edit menu, but the warnings still pop up. What is
unusual is that if I manually clear the options check box, the
warnings are surpressed, but not when it is done by code. I've
compacted/repaired the db just to see it that would have any affect to
no avail. I don't get any debug errors.

Any suggestions.

TIA,
Mark
 
N

Nikos Yannacopoulos

Any chance your syntax was incorrect? The correct syntax
for setwarnings is
DoCmd.SetWarnings False
and it's been working fine for me for quite some time!

Nikos Y.
 
T

Tim Ferguson

(e-mail address removed) (Mark) wrote in
I have import routines that do a lot of appending and deleting. First
I was using SetWarnings False to allow my vb code to run w/o system
warnings. However that function stopped working for unknown reasons
(both via code and macro).

You might also consider using the alternative

db.Execute strSQL, dbFailOnError

method, which allows longer SQL strings, proper error trapping, and does
not even think about putting confirmation dialogs to the user.

All the best


Tim F
 

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

Top