Capture number of appended/updated records

  • Thread starter Thread starter Chutney via AccessMonster.com
  • Start date 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?
 
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
 
Back
Top