Replication Code?

GregSmith

Registered User.
Local time
Today, 17:46
Joined
Feb 22, 2002
Messages
126
I have by database setup to replicate and it works great.

What I am trying to do is create a command button that will allow you to replicate on the fly without having to close the form down and select tools then replicate then sync.

Anyone got any good code that works? I have tried just about everything I could find and nothing worked...

This seems to be a popular question so I know someone must have this setup and working via a command button...

Thanks
 
Found this code and it works great under Access 2000.
Create a command button with the following code:

Dim repMaster As New JRO.Replica
repMaster.ActiveConnection = currentproject.connection
repMaster.Synchronize “C:\Path to replica”, jrSyncTypeImpExp, jrSyncModeDirect

End Sub

==============================================

*** Note:

Add a reference to JRO under Tools References in the VBE. (Visual Basic Editor). It's under the Microsoft Jet options. You NEED this for it to work correctly.
 

Users who are viewing this thread

Back
Top Bottom