Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'********************
'*
'* @AUTHOR : Mike Slama (slamkeys@ev1.net)
'* @PURPOSE : Handle replication
'* @DATE : 8/20/2002
'* @NOTES : Checks to see whether current database is the
'* Master or Replica and adjusts the path accordingly.
'*
'********************
Public Sub ReplicateMe()
On Error GoTo ErrHandler
Dim db As Database
Dim strDBType As String
Dim strPath As String
Dim strMsg As String
Set db = CurrentDb
If db.DesignMasterID = db.ReplicaID Then
strDBType = "Design Master"
strPath = "\\Xp-mobile\ToshibaS607\Access\SlamKeys\Replica of Time and Billing.mdb"
Else
strDBType = "Replica"
strPath = "\\Slammer\C\My Documents\Access\SlamKeys Billing\Time and Billing.mdb"
End If
Select Case strDBType
Case "Design Master"
strMsg = "You are the design master, would you like to synchronize with the replica?"
Case "Replica"
strMsg = "You are a replica, would you like to synchronize with the Master?"
Case Else
Exit Sub
End Select
If MsgBox(strMsg, vbQuestion + vbOKCancel, "SlamKeys Billing") = vbOK Then
DoCmd.Hourglass True
SysCmd acSysCmdSetStatus, "Synchronizing databases, please wait..."
db.Synchronize strPath, dbRepImpExpChanges
Else
GoTo ExitHere
End If
DoCmd.Hourglass False
SysCmd acSysCmdSetStatus, "Operation Complete!"
MsgBox "Sychronization successful!", vbInformation, strDBType
ExitHere:
DoCmd.Hourglass False
SysCmd acSysCmdClearStatus
Exit Sub
ErrHandler:
MsgBox "Sychronization failed!", vbCritical, "SlamKeys Billing"
Resume ExitHere
End Sub