Best set-up to ensure data integrity

teambond

Registered User.
Local time
Yesterday, 22:13
Joined
Jun 2, 2013
Messages
24
Hi,

I'm making some changes to my order management database to include the component breakdowns of parts rather than just the parent part numbers.

Currently, I have my orderdetailsubF running off a query that joins together the orderdetailT to the partslistT to show the description and price of the chosen part. Because I am now including the component breakdown I am now going to roll the price up from the sum of the component parts.

The problem I have is that someone may choose a part, "RLT132", that may have a blue base. The customer may want to change that to a pink base, but we would still call it "RLT132". In order to cater for this, I have created an orderedpartsT that records the component breakdown for that particular orderline. I've made the part number the concatenation of the orderdetailID and the part number (eg. "1324_RLT132") and recorded the components that make up that unique id.

I am now trying to make the changes to my orderdetail form to bring up description and price and want to make sure that I'm not replicating data.

The Description still needs to be called across from the PartslistT from "RLT132" and the price needs to be rolled up from "1324_RLT132". I don't currently record the Price of "1324_RLT132" anywhere so that I can directly call it up as I think that will cause a data integrity issue?

At the moment I am thinking I will have to code the filling of my order detail form rather than basing it off a query as I have no way to link together "RLT132" and "1324_RLT132" via SQL.

Sorry I've rambled but would just like someone to check my logic before I go about dismantling my existing forms.

Thanks
 

Users who are viewing this thread

Back
Top Bottom