Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A2007 Synchronization Problem 1

Status
Not open for further replies.

MajP

Technical User
Aug 27, 2005
9,382
US
Here is a challenge to all you MVPs. I have a replicated database. The master resides on the server, and the users all have a FE and a replicated BE on their local computers. From the front end I have wrote this this code to synchronize the users local replica.

Code:
Public Sub startSynchReplica()
  On Error GoTo errLbl:
  Dim strBackend As String
  Dim dbReplica As dao.Database
  Dim app As Access.Application
  Dim synchPath As String
  Dim rtn As Long
  synchPath = "\\123.45.67.89\home\theMaster.mdb"
  strBackend = CurrentDb.TableDefs("Tasks").Connect
  strBackend = Mid(strBackend, 11)
  Do Until FileExists(synchPath)
    rtn = MsgBox("Can not find Master Daster Base.  Please select OK to search or CANCEL to cancel synch.", vbOKCancel, "Search for Master")
    If rtn = vbCancel Then
      Exit Sub
    End If
    synchPath = fGetFileName
    
  Loop
     Set dbReplica = OpenDatabase(strBackend)
     'MsgBox strBackend
     dbReplica.Synchronize synchPath, dbRepImpExpChanges
     MsgBox "Synchronization Complete" & vbCrLf & "If no conflicts pop up simply open the Replica and then close it.", vbInformation, "Synch Complete"
     Set dbReplica = Nothing
     Set app = getNewDB(strBackend)
    Exit Sub
errLbl:
   Call errHandler(Err.Number, Err.Description, "Error in startSynchReplica")
End Sub

The code worked great until we switched the office over to A2007.
Now when I run it I get the following error at the line:
dbReplica.Synchronize synchPath, dbRepImpExpChanges
Operation is not supported for this type of object. (Error 3251)
helpfile said:
You were attempting to execute a method or assign a value to a property that is usually valid for the object, but is not supported in this specific instance. For example, the Edit method is generally valid for Recordset objects, but not for a snapshot-type Recordset. This error could also occur in cases where the operation is not permitted due to the type or status of the object — as when trying to use the MovePrevious method on a forward–only–type Recordset. Some operations are also not supported, depending on if you are accessing a Microsoft Access database engine or an ODBC data source
[/quote helpfile]

1. I have ensured both the FE and BE are in trusted locations
2. I have converted it to 2007 format and 2003 format but no luck
3. I can still manually synch from the Back End.
4. All references are present
The weird part it still works for some users. I have to think that it is some kind of setting on either the FE or BE. By the error message I am guessing that it no longers recognizes the BE as being a replica and thus the "this type of object" error.

Any ideas would be greatly appreciated. I think the important clue is that it still runs for some users on Access 2007.
 
You are the Man! That is exactly what it was. I have no idea how you found that. Thanks a million. I thought for sure I was out of luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top