Mass Insert problem Using VBA with Access

G

GCallend41

I am currently developing a report application at work. I am using ADO to
perform mass deletes and mass inserts to clear and repopulate my tables.
Sometimes, during execution, the receiving table is populated with zero
records. Yet however, if I execute the same function in step-through mode (F8
Button to trace through VBA logic), the table gets correctly populated. I am
buffled by this. Is it during execution mode, the catalog or table is not
updated fully, before the logic moves on to the other statements? There
seems to be no SQL commit statement using ADO.
I would appreciate any sugegstion to rectify this issue.

Example of the SQL Statement:

createConn -- Function that create Connection

strsql = "Insert into AuditCommGrp Select Code, Finding, priority from
tst_issues "
strsql = strsql + "where Left(code,2) = '05' Group by Code"

conn.execute(strsql)
 

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