Link to home
Start Free TrialLog in
Avatar of mcj
mcj

asked on

Export table from foo.mdb to bar.mdb

I need the vb command to export a table from one database to another database.

Please note that I am not trying to accomplish andthing like:
DoCmd.OutputTo acOutputTable, tableFoo, acFormatRTF, "C:\FooFolder\FooFile.rtf"
(Export to an RTF file)
or:
DoCmd.OutputTo acOutputTable, tableFoo, acFormatXLS, "C:\FooFolder\FooFile.xls"
(Export to an Excel file)
or:
DoCmd.OutputTo acOutputTable, tableFoo, acFormatTXT, "C:\FooFolder\FooFile.txt"
(Export to a text file)

I need to have a button on a form in foo.mdb that, when clicked, will copy it's own tableFoo from itself into another access database located at C:\FooFolder\bar.mdb

1) I don't actually want to get this out of Access format into something else, just copy it from one Access database to another one.
2) I've Googled this an fonund a lot of "the acFormatRTF" export is broken or "the acFormatXLS" export truncates blah... blah... blah..." so I'm not interested in taking the data out of Access format at all since I'm worried that will break the data. (Especially since there are some long memo fields.)
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mcj
mcj

ASKER

Perfect! Thanks!