Number of records appended

G

Guest

I'm creating a log that will store the time, username and the number of
records returned(appended) by an append query. The time and username is very
easy, my problem is logging the number of records.

Is there a property in Access VBA that i can access programmatically to know
the number of records appended by an action query?

Any ideas (no matter how wild) will be most appreciated. thanks in advance.
 
D

Dirk Goldgar

V Ramos said:
I'm creating a log that will store the time, username and the number
of records returned(appended) by an append query. The time and
username is very easy, my problem is logging the number of records.

Is there a property in Access VBA that i can access programmatically
to know the number of records appended by an action query?

Any ideas (no matter how wild) will be most appreciated. thanks in
advance.

Dim db As DAO.Database

Set db = Current Db

db.Execute "MyAppendQuery", dbFailOnError

Msgbox "Hey, I just appended " & db.RecordsAffected & " records!"

Set db = Nothing
 
G

Guest

Dirk Goldgar said:
Dim db As DAO.Database

Set db = Current Db

db.Execute "MyAppendQuery", dbFailOnError

Msgbox "Hey, I just appended " & db.RecordsAffected & " records!"

Set db = Nothing

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


thanks a lot dirk, this is the code i needed.
 

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