Full Version: Docmd.transferdatabase-import Tblfrom Ade ?
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
ipisors
Can I use access vba to import a table from an ADE ? I can copy/paste the ade table, into my MDB/MDE, so can I also use docmd.transferdatabase?

I'm getting this runtime error:

[My database name] cannot find the object "|."

CODE
Sub test()
DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Path\TheOtherDatabaseName.ade", acTable, _
                       "tablename", "tablename"
End Sub


PS - sorry, looks like I may have had the name wrong. Apparently the names look a lot different in an ADE and not always what they appear to be.
strive4peace
Hi Isaac,

are you sure that ADE is the right extension? MDE perhaps? or ACCDE?
ipisors
It actually is an ADE, but eventually I solved it by realizing I actually had the name of the table wrong.

Apparently in an access project there are multiple different 'names' that can be apparent, such as the table name as shown in the object display, the table name as shown in the "add tables" dialogue when creating a query in QBE, and the table name that 'really exists'.......Once I got that right, the error went away and it worked.

eventually i decided not to go this route, though......As I realized that importing an entire table with hundreds of thousands of records......Then deleting it........caused an insane amount of bloat and wasn't anywhere near worth the trouble! wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.