TransferDatabase to an EXISTING table

G

Guest

I need to import tables from another MS Access DB to tables with the same
names in my local MS Access DB, and then alter some of the field sizes in my
local tables. Since TransferDatabase appears to import only to a NEW table, I
wrote code to delete the existing local tables first, then import the tables
with TransferDatabase, and then alter the field sizes. This works fine as
long as the local tables exist before I delete them. Once in a while, one or
more of the tables do not get re-created for one reason or another, and when
the user runs the program, an error that "Access can't find the Object
'TableName'" is generated and the program halts. I then have to manually
re-create the table(s) and re-run the program.
Is there a way to make TransferDatabase import to an existing table
(over-writing it)?
Or is there a way I can check if a table exists before I attempt to delete it?
Any help would be greatly appreciated!
Mariet
 
G

Guest

I am using VBA.
Although I resolved my problem by temporary turning off error reporting
before I delete the existing table, I still would like to know if there is a
way to transfer a table from another database to an existing table with the
same name in the current database, overwiting its content, or maybe appending
to it.

Thanks!

MarieT
 
G

Guest

Link to the table in the other database, then use an append query to append
the data. If you want to overwrite, just delete the data in the table before
you do the append
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top