Problem return Record Set

R

Robin9876

In an Access 2000 database that has linked tables to a backend access
database that uses the same access workgroup security file, I am
trying to run a SQL Statement.

The statement is a valid insert statement which inserts some records
the problem is how to return how many rows were added.

There is bound to be something obvious that I am missing, what is the
best way to run a insert statement and return the number affected rows?
 
A

Albert D. Kallal

go:
dim strSql as string
dim db as dao.database

db = currentdb


.......
.......
strSql = "update FAXBOOK set fax_group = '2' where fax_group = '1'"
db.Execute strSql
Debug.Print db.RecordsAffected

So, of the current database object, RecordsAffected will return the number
of records.....
 

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