[AccessD] Relink Multiple BE

Stuart McLachlan stuart at lexacorp.com.pg
Mon Apr 13 17:00:48 CDT 2009


It would be quicker if you:

For each existing BE:
  Link and open the first table
  Link, append, delete the rest
  Append, delete the last.

Keeping the first table open will speed up accessing the others.

And here's a simple function to do the Link, append, delete:

Function GetData(tablename As String, datafile As String) As Long
DoCmd.TransferDatabase acLink, "Microsoft Access", datafile, acTable, tablename, "tmp" & 
tablename, False
CurrentDb.Execute "Insert into " & tablename & " Select * from " & "tmp" & tablename
DoCmd.DeleteObject acTable, "tmp" & tablename
End Function



On 13 Apr 2009 at 21:40, Mark A Matte wrote:

> I have a list of all tables and which MDB they are in...I need to loop
> through this list and populate the local copy of said table. 
> Transferdatabase imports and creates new table...but I want to append
> the data to an existing table.  Should I link 1...append...delete
> link...link new...append??? 




More information about the AccessD mailing list