RunSQL

D

Dwayne Conyers

We use the following code in a control:

DoCmd.RunSQL newSQL

The newSQL argument runs a query that selects data from diverse tables and
writes into a table we call "temp" -- this table exists only to populate
certain reports that are either saved to disk or e-mailed.

When the RunSQL is executed the user gets two prompts:

(1) The existing table 'temp' will be deleted... do you want to
continue?

(2) You are about to paste one row in to a new table

We would like to silence these prompts and have the actions execute as if
the user pressed "Yes."

The question: what argument(s) or command(s) are required to suppress these
prompts? The help file doesn't provide much in that regard.

Thanks in advance!
 
P

PC Datasheet

Dwayne,

Try this:

DoCmd.SetWarnings False
DoCmd.RunSQL newSQL
DoCmd.SetWarnings True
 

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