Imported data not being commited?

M

mike

HI,

I'm running a macro in another database to the one i'm
running the vb code to import data into that database.
However when i run a delete query (or any queries)
sometimes I get a row count of zero rows.
Is there a way to commit the a macro results? Seems to be
a timing issue.

dim app As Object

Set app = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
app.OpenCurrentDatabase "other database"
app.DoCmd.RunMacro "my import macro into table1"
app.CloseCurrentDatabase

set db = opendatabase("other database")
db.exexute "delete from table1"
db.RecordsAffected ' this varies each time to be 0
or something else.
 

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