Replace table that is in relationship with new version via macro/p

G

Guest

I'm running Access 2002. I want to replace a table in the backend (MDB)
database with a new version of the table (has a few new/changed fields but
not the key fields) via a macro or programming. The table is in relationships
with several other tables. I want to simple replace the table (same name) and
keep all the existing relationships.

When using the CopyObject Action in a macro, it halts with error
(paraphrased) - '...can't delete a table that is participating in
relationship'.
How can I replace this table with a new version by the same name and keep
existing relationships?

Thanks,
Dan
 
D

Dale Fye

Dan,

The best method to alter a tables structure that already exists is through
use of the Alter Table statement. Using this technique, you won't have to
delete the old table, just modify the structure. You can add and delete
columns, modify the indexes, set AllowNulls on or off, all from this simple
statement.

HTH
Dale
 

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