Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Using DoCmd.TransferDatabase To Link Tables ( PLEASE HELP!!!)


Message #1 by "Jonathan R. Els" <jonathan.els@f...> on Sat, 20 Apr 2002 03:59:31 +0200
This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C1E81F.CA2224B0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Dear Group,
 
I would like to thank everybody for the information that was supplied
for our merging problemm we really appreciate it!
We are tring to use the TransferDatabase Method of the DoCmd object to
link two databases using the following code:...
    
DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\FitzBen
Projects\Sync Database\FitzBed.mdb", acTable, "Customers", "C:\FitzBen
Projects\KWTHA Project Folder\FitzBed.mdb", No

Running the following code, we get an error message stating "Runtime
Error:- 2075, "This operation requires an open database""
What is required for this code to function???? We also tried to use ADO
to open the databases and still recieved the same error message.
 
Private Sub cmdSync_Click()
    
    Dim sConnect1 As String
    Dim cnSync1 As ADODB.Connection
    Dim sConnect2 As String
    Dim cnSync2 As ADODB.Connection
    
    Set cnSync1 = New ADODB.Connection
    Set cnSync2 = New ADODB.Connection
    
    sConnect1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
"C:\FitzBen Projects\Sync Database\FitzBed.mdb"
    sConnect2 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
"C:\FitzBen Projects\KWTHA Project Folder\FitzBed.mdb"
    
    cnSync1.Open sConnect1
    cnSync2.Open sConnect2
    
    DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\FitzBen
Projects\Sync Database\FitzBed.mdb", acTable, "Customers", "C:\FitzBen
Projects\KWTHA Project Folder\FitzBed.mdb", No
    
End Sub

Could anybody please help us figure this out.
 
Kind Regards,
Jonathan
 
 
 



Message #2 by tperkins@g... on Mon, 22 Apr 2002 16:41:03
> This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C1E81F.CA2224B0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Dear Group,
 
I would like to thank everybody for the information that was supplied
for our merging problemm we really appreciate it!
We are tring to use the TransferDatabase Method of the DoCmd object to
link two databases using the following code:...
    
DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\FitzBen
Projects\Sync Database\FitzBed.mdb", acTable, "Customers", "C:\FitzBen
Projects\KWTHA Project Folder\FitzBed.mdb", No

Running the following code, we get an error message stating "Runtime
Error:- 2075, "This operation requires an open database""
What is required for this code to function???? We also tried to use ADO
to open the databases and still recieved the same error message.
 
Private Sub cmdSync_Click()
    
    Dim sConnect1 As String
    Dim cnSync1 As ADODB.Connection
    Dim sConnect2 As String
    Dim cnSync2 As ADODB.Connection
    
    Set cnSync1 = New ADODB.Connection
    Set cnSync2 = New ADODB.Connection
    
    sConnect1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
"C:\FitzBen Projects\Sync Database\FitzBed.mdb"
    sConnect2 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
"C:\FitzBen Projects\KWTHA Project Folder\FitzBed.mdb"
    
    cnSync1.Open sConnect1
    cnSync2.Open sConnect2
    
    DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\FitzBen
Projects\Sync Database\FitzBed.mdb", acTable, "Customers", "C:\FitzBen
Projects\KWTHA Project Folder\FitzBed.mdb", No
    
End Sub

Could anybody please help us figure this out.
 
Kind Regards,
Jonathan
 
 
 




  Return to Index