Capture number of appended/updated records

  • Thread starter Chutney via AccessMonster.com
  • Start date
C

Chutney via AccessMonster.com

I run a procedure to append new records and update existing ones. The
procedure turns off warnings so that it will run without user intervention.
However, I would like to capture the usual Access notices about the number of
records to be appended or updated so that at the end of the procedure I can
display these numbers. Is it possible to do this?
 
M

Marshall Barton

Chutney said:
I run a procedure to append new records and update existing ones. The
procedure turns off warnings so that it will run without user intervention.
However, I would like to capture the usual Access notices about the number of
records to be appended or updated so that at the end of the procedure I can
display these numbers. Is it possible to do this?


Use the Execute method instead of using RunSQL.

Set db = CurrentDb()
db.Execute "yourquery"
MsgBox db.RecordsAffected & " records were appended"
Set db = Nothing
 

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