Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / December 2004

Tip: Looking for answers? Try searching our database.

Cascade Update Related Fields Bug?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike_iDbM - 27 Dec 2004 18:57 GMT
I have set up one to many relationship between  an order table (master/one)
and a order details table (slave/many) using the related field  orderID .
This field is the primary key in the order table . I have set the enforce
referential  integrity and the checkboxes for both cascade update and cascade
delete related feilds functionality  . When I  enter data into the related
feild orderID in the order table the order details field is not updated as I
would expect . However when I delete the data  entered into this feild in the
order table  ( I manually entered the same data  into this feild in the order
details table)  the data was also deleted from the order details table. I
concluded that the delete cascade function seem to work fine. So why does the
cascade update not work ?
John Vinson - 27 Dec 2004 20:49 GMT
> When I  enter data into the related
>feild orderID in the order table the order details field is not updated as I
[quoted text clipped - 3 lines]
>concluded that the delete cascade function seem to work fine. So why does the
>cascade update not work ?

It's working correctly - it's your interpretation that is off!

A relationship does not, and SHOULD not, automagically create a new
empty placeholder record in the child table. A relationship *prevents*
you from adding "orphan" records; it does not create new records.

Normally one would use a Form bound to the order table, with a Subform
bound to the order-details table, with the OrderID as the master/child
link field. When there is data to be entered into the details table
(but not before!), the user would start entering data on the subform;
at that point the new record will be created. There is no need or
benefit to adding empty "placeholder" records.

                 John W. Vinson[MVP]
Mike_iDbM - 27 Dec 2004 21:37 GMT
Yes , you are absolutely correct thank you for the precise clarification. I
tested your suggestion and the cascade update  function works fine once the
record is
created and not before as you say empty placeholders are not a good thing.
This was my first question in this forum and I am truly impressed and
appreciative.

Thanks Again
Mike

> > When I  enter data into the related
> >feild orderID in the order table the order details field is not updated as I
[quoted text clipped - 18 lines]
>
>                   John W. Vinson[MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.