Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relationship

Status
Not open for further replies.

iainv

Technical User
May 18, 2003
2
GB
Can anyone help? I am replacing an existing table with an imported table, but when I try to delete the original table before I import a new one,it will not let me delete it due a relationship. Is there anyway I can rmove the relationship and reinstate it on the new table using VBA?
 
Yes, but why??? If the data you are importing is in the exact same format as the table that exists, there is no need to delete the table and recreate it every time.....All you need to do is clear the table in insert the new data.

to clear the table:

DoCmd.RunSQL ("DELETE * FROM tablename")

to insert into existing table:

DoCmd.TransferText blah, blah, tablename, blah, blah, blah

or whatever method you are using.

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Or just bring up the relationship window, double click on the connecting line to bring up the edit relationships window, clear enfore referential integrity, close that window, then select the connector and hit your delete key.
After you import your new table, reestablish everything.

Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top