How can I implement an automatic synchronization on a replica
database with little or no user intervention? Can I tell it to
Synchroize on close? Can I create a macro to do this without
putting the DB in a loop?
If you have properly set up your replicated application, you will
have an unreplicated front end (forms/reports/etc.) linked to a
replicated back end with only your data tables.
The goal then is to have the back end synch with another replica
when the front end is closed.
First off, you have to consider a few issues:
1. do you have more than one user at a time? If so, you probably
don't want every user synching the shared back end each time they
close the front end.
2. if it's a single-user app (or only one user in each location
where you're wanting to synch), you have to consider what kind of
connection you have between the local replica and the remote replica
you want to synch with. If all the replicas are on the same LAN, I
have to question why you're using replication at all, since it
really serves no purpose there, as you should just share a single
back end. If, on the other hand, your remote replica is somewhere
across the Internet, a VPN or a WAN, then you can't use standard
direct replication, since it's way too dangerous (it's simply too
easy for the connection to drop during the synch and corrupt the
remote replica such that it is no longer replicable, i.e., can't be
synched with members of its replica set any more) and way too slow.
You need indirect (my preference) or Internet replication, both of
which are much more efficient and completely safe. But they also
require additional components and substantial expertise to set up
and use.
3. what you're asking can't be done with a macro -- it requires VBA
code.
Post back with some more information so we can provide better
answers. You also might want to read through some of the Jet
Replication Wiki:
http://dfenton.com/DFA/Replication/