Hi.
I'm trying to delete a relationship in from tables
The simplest way in the GUI is to open the Relationships window and delete
the line between the primary key in the table on the one side and the
foreign key in the table on the many side. The simplest way in code is to
drop the foreign key constraint on the table on the many side.
If you're doing it programmatically, use a SQL query to drop the constraint,
but you must use the name of the foreign key constraint, which is stored in
the MSysRelationships table. If you used the GUI to create the
relationship, then the name of the constraint will be the name of the table
on the one side concatenated with the name of the table on the many side.
For example:
ALTER TABLE tblManySide
DROP CONSTRAINT tblOneSidetblManySide;
Beware that you should not add or delete any records in the two tables while
the relationship is missing, or you could end up with orphan records, i.e.,
children in the table on the many side with no parent in the table on the
one side.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs:
www.DataDevilDog.BlogSpot.com,
www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.