How can I link tables from one Access dabase in another Access database through VB on the fly?
Printable View
How can I link tables from one Access dabase in another Access database through VB on the fly?
The following example utilized early binding (set references to MS Access x.x object type library) or if you have problem with this technique then use late binding instead (CreateObject function)
VB Code:
Dim AccessDB As Access.Application Set AccessDB = New Access.Application With AccessDB .OpenCurrentDatabase App.Path & "\MyDB.mdb" .DoCmd.TransferDatabase acLink, , "\\server\drive\folder\somedb.mdb", acTable, "Table1", "LinkTable1" .Quit End With Set AccessDB = Nothing
Thanks, you da man.
He, he, he ... Sure am ... :-))