Are you doing this using VBA or in a Macro?
"MarieT" wrote:
[Quoted Text] > 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
|