Number of records inserted

S

Samantha

I'm using SQL to insert records selected from various tables and inputs into
a temp table, by using the statement: db.Execute sql, dbFailOnError.
I need to know the number of records that are inserted into the temp table
from the db.Execute statement. Is there a way to find out this? Any help is
greatly appreciated.
 
J

John Spencer

Try the following immediately after the db.Execute statement

Msgbox db.RecordsAffected & " records inserted"



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
M

Marshall Barton

Samantha said:
I'm using SQL to insert records selected from various tables and inputs into
a temp table, by using the statement: db.Execute sql, dbFailOnError.
I need to know the number of records that are inserted into the temp table
from the db.Execute statement. Is there a way to find out this? Any help is
greatly appreciated.


NumRecs = db.RecordsAffected
 

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