Solved

Export table from foo.mdb to bar.mdb

Posted on 2008-06-17
2
219 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 92

Accepted Solution

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

Author Comment

by:mcj
ID: 21807232
Perfect! Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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