Re: Import all tables from one database to another



You need to use ADOX library. See this link (watch for linewrapping) for an
earlier post about how to do this:
http://groups.google.com/group/microsoft.public.access.developers.toolkitode/browse_frm/thread/9ac403962a86c8cb/81bee890b7f86153?lnk=st&q=access+ado+loop+through+tables+list&rnum=6&hl=en#81bee890b7f86153

--

Ken Snell
<MS ACCESS MVP>



"Debbie" <Debbie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:58A32F4E-24D2-4244-BCA2-F15C55D2E5F9@xxxxxxxxxxxxxxxx
Ken,
Thank you so much. Just out of curiosity, can this be done in ADO?
Thanks
again,
Debbie

"Ken Snell (MVP)" wrote:

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 Snell
<MS ACCESS MVP>

"Debbie" <Debbie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1586F4CA-76BB-4511-BABC-4CC3FA7592A5@xxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: Import all tables from one database to another
    ... "Debbie" wrote: ... "Ken Snell " wrote: ... <MS ACCESS MVP> ... Dim tdf As DAO.TableDef ...
    (microsoft.public.access.externaldata)
  • Re: SP3 and Access with VSS Integration
    ... "Ken Snell " wrote: ... <MS ACCESS MVP> ... "Cory J. Laidlaw, Beyond01.com" ... I then can provide the database to MS programmers to test and evaluate. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Form crashes when I make combo box a bound control
    ... <MS ACCESS MVP> ... "Ken Snell MVP" wrote: ... I deleted the combo box, did a compact/repair, opened the database ... The subform record is the order detail. ...
    (microsoft.public.access.forms)
  • Re: Importing "Tab-Delimited" text files
    ... <MS ACCESS MVP> ... Ken Snell wrote: ... using the linked path that you have for ... How are the other users using the database? ...
    (microsoft.public.access.externaldata)
  • Re: #Deleted
    ... and then the table tried to retrieve it to show it to ... Ken Snell ... <MS ACCESS MVP> ... Whilst looking through one of the tables in my database at work I noticed ...
    (microsoft.public.access.tablesdbdesign)