You are about to append X row(s)

M

Marnus

Hi All

I am using VBA to write data to a table. For every row I
receive "You are about to append X row(s)" Does anyone
know how to get rid of that prompt?

Regards
Marnus
 
J

jmonty

You can toggle off/on the warning messages:

'Turn off the default Action query confirmations
DoCmd.SetWarnings False
'Run your query here
DoCmd.SetWarnings True
 
D

Douglas J. Steele

You can also use the Execute method.

If you're running a SQL statement that's in a string, you can run it from
the Database object;

CurrentDb().Execute strSQL, dbFailOnError

If it's a query, the QueryDef object has an execute method as well.

Note the use of the dbFailOnError parameter above: that allows you to trap
any errors that may occur running the query.
 

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