Synchronisation using code
I am trying to synchronise replicas using the following code:
Dim dbs As DAO.Database
Set dbs = opendatabase("e:\design master\doug.mdb")
dbs.synchronize "k:\nydoug.mdb", dbrepimpexpchanges
MsgBox "sync completed"
dbs.Close
Set DB = CurrentDb
docmd.quit
It works fine for a test database, with only one change, but when I try it with my real database (with many changes) it does open both databases, but then it fails (before showing the message box) and says it can't find the database sync.mdb, which is the database I am running the code from.
Does anyone know what I have done wrong?
Thanks...
I am trying to synchronise replicas using the following code:
Dim dbs As DAO.Database
Set dbs = opendatabase("e:\design master\doug.mdb")
dbs.synchronize "k:\nydoug.mdb", dbrepimpexpchanges
MsgBox "sync completed"
dbs.Close
Set DB = CurrentDb
docmd.quit
It works fine for a test database, with only one change, but when I try it with my real database (with many changes) it does open both databases, but then it fails (before showing the message box) and says it can't find the database sync.mdb, which is the database I am running the code from.
Does anyone know what I have done wrong?
Thanks...
Last edited: