Action query confirmation

G

Guest

Is it possible to switch off action query confirmation in vba, and, if I do
his, will an append query still identify errors? I have a form used to input
timesheet information, and, to submit this, users run a series of three
action queries, two append queries, and one delete query. This results in
lots of confirmations and the users find this irritating. I could switch off
confirmations totally, but I am reluctant to do this.
 
N

Nikos Yannacopoulos

Jim,

You are not clarifying whether you are running saved queries or SQL queries
in your code. In the former case:

Precede each action query (or block of) execution in your code by:

DoCmd.SetWarnings False

followed by:

Do.Cmd.SetWarnings True

after it has executed, so you switch off confirmations locally only.

In the case of SQL queries, instead of using DoCmd.RunSQL strSQL, use:

CurrentDb.Execute strSQL

which does not require turning off the warnings before, it will run the
action query without warnigns anyway.

HTH,
Nikos
 

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