?
Solved

Export table from foo.mdb to bar.mdb

Posted on 2008-06-17
2
Medium Priority
?
222 Views
Last Modified: 2013-11-27
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.)
0
Comment
Question by:mcj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 21807154
Use the DoCmd.TransferDatabase method
0
 

Author Comment

by:mcj
ID: 21807232
Perfect! Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question