Import all tables from one database to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I need to programatically import all the tables from one Access database to
another Access database. I know how to use the Transfer Database command but
I do not know how to loop through all the tables in the dataabase that I want
to import from. Can anyone give me an example of how to do that part of it?
Thanks very much.
Debbie
 
General code to loop through tables:

Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
For Each tdf in dbs.TableDefs
' code here to look at tdf object's properties, etc.
Next tdf
dbs.Close
Set dbs = Nothing
 
Ken,
Thank you so much. Just out of curiosity, can this be done in ADO? Thanks
again,
Debbie
 
Back
Top