Solved

Export table from foo.mdb to bar.mdb

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now