Records affected by running by docmd.openquery

  • Thread starter Thread starter lowestbass
  • Start date Start date
L

lowestbass

I am building a database with approximately 70 queries which I am
running from VBA. I have disabled messages, but I would like to
creae a log of the records that have been updated by each query. Is
there a way of finding out how many records are updated when using
"docmd.OpenQuery" and when using DoCmd.RunSQL.

Thank you in advance for your help.

Jeremy Lowe
 
Use Execute instead of RunSQL.

Example:
With dbEngine(0)(0)
.Execute "Query1", dbFailOnError
Debug.Print .RecordsAffected
End With
 

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

Back
Top