Instead of deleting and re-importing the tables, use delete queries to delete the *records* they contain. Then import the updated data into the existing tables. Assuming that the relationships enforce relational integrity, you'll need to be careful about the order in which you run the queries and import the data.
But would it not be simpler to use linked tables to access the ODBC datasource? That way, you'd always have the latest data and there'd be no need to delete and re-import stuff.
On Mon, 5 Jun 2006 22:03:01 -0700, MTNCFO <MTNCFO[ at ]discussions.microsoft.com> wrote:
[Quoted Text] >Hi there > >Is there a way to "automate" the writing of realtionships between imported >tables? > >I have a situation where I need to re-import tables through an ODBC >connection into access a few times a day, and I need the relationships to be >maintained. > >Currently, any macro wirtten to delete and then re-import the tables, >requires all relationships to be deleted first. > >Is there a way to 1) delete the existing relatiohsips 2) delete the exiting >tables 3) re-import the updated tables 4) re-create the relationships ?? > >Thanks in advance for any advice you may be able to offer. > >MTN
-- John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
|