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.
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.