Synchronization Macro

  • Thread starter Thread starter Guest
  • Start date Start date
Is there some coding for a macro to synchronize a database?

You mean to synchronize two Jet replicas?

I don't use macros, so I can't tell you how to do that, nor if it's
even possible.

The code for synchronizing two replicas on the same LAN is very
simple:

Dim dbLocal As DAO.Database

Set dbLocal = DBEngine.OpenDatase("C:\Path\LocalReplica.mdb")
dbLocal.Synchronize "\\Server\Share\RemoteReplica.mdb"

dbLocal.Close
Set dbLocal = Nothing

You can put this code behind a command button on a form, or save it
in a module as a function and call it with RunCode in a macro.
 
Back
Top