Re: modifying relationships using DAO?



TTBOMK one must use an ADODB connection to deal with Updates and
Constraints as in:

(dropping the existing constraint)

CurrentProject.Connection.Execute _
"ALTER TABLE [Order Details] " _
& "DROP CONSTRAINT " _
& "OrderParent "

(and rebuilding it with the OnUpdate or OnCascade attributes set)

CurrentProject.Connection.Execute _
"ALTER TABLE [Order Details] " _
& "ADD CONSTRAINT " _
& "OrderParent " _
& "FOREIGN KEY (OrderID) " _
& "REFERENCES Orders (OrderID) " _
& " ON UPDATE CASCADE " _
& " ON DELETE CASCADE"

.