Use TransferDatabase for all table, no relationships

  • Thread starter Thread starter bhammer
  • Start date Start date
B

bhammer

I've made some design changes to forms and I want to import all the data from
the old version into this new, shiny one. In VBA how can do
docmd.TransferDatabase acImport, ,"MyOldAccessFile", AllTables,
NoRelationships? or the like?

The equivelent of File/GetExternalData/Import, then in the Import Objects
dialog selecting the Tables tab, clicking Select All, clicking Options and
un-checking Relationships.
 
I got it. I found a similar example on the Microsoft Knowledge Base for a
function, fImportdb, that involves looping through the TableDefs of the
Import mdb. Relationships are only checked by default in the Import Objects
dialog; with VBA if you want the relationships you have to import their Defs.
 
Is this something that you will only do once (your description seems to
suggest this)?

If so, by the time you're done learning how, developing, testing,
implementing and checking to be sure it worked, I suspect you could have
already followed the File/GetExternalData/... path and been done!

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top