You are about to append X row(s)

  • Thread starter Thread starter Marnus
  • Start date Start date
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
 
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
 
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.
 
Back
Top