![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Actually, isn't it a many to many Albert? (hint, all these examples from real life folks) tblCar: CarID (PK) Make (VW, Ford etc.) Model (Transporter Van, Scorpio Estate etc. tblExtra: ExtraID (PK) Extra (KnackeredAutoShift, Duff Suspension Wishbones, Out of balance prop shaft - you're getting the idea now?) ExtraPrice trelCarExtra: CarID ExtraID unique index on those. "Albert D. Kallal" <kallal (AT) msn (DOT) com> wrote in message news WiVa.574142$Vi5.14265123 (AT) news1 (DOT) calgary.shaw.ca...first, you don't enter data into a query. You build a nice form that your users can use. Can you imagine if products like Outlook, or quicken just let users edit the table! There is no control, no user friendliness and certainly letting users edit tables is a formula for disaster. So, you would normally build a form. As have your design, you have tblCars. So you can enter the brand, the price, and maybe you will add some fields like date sold, and the colour etc. That is your ONE record. Now, you also have a Extras table, that is your many side,and that would be a sub form. Brand: Ford Price: 20,000 Color: Red SoldBy: Joe: now, if you have a "many side", then extras would be a sub form, and you would only need to display one field: Extras: Moon Roof Floor mats Crome mags So, as you design is now, you have a one to many, and thus each extra as designed can not have a price. If you need to have a price for each extra, then obviously the "price" belongs in the extra table. So, if we add a ExtraPrice field, we could then have price for each extra. Thus, the total cost of the car would be each ExtraPrice + the exiting base Price. So, you can't enter Price for each Extras with your current design, since you have "price" on the "one" side of the one to many relation. If you need a price for each extra, then add a extra price field to the Extras table. -- Albert D. Kallal (MVP) Edmonton, Alberta Canada kallal (AT) msn (DOT) com http://www.attcanada.net/~kallal.msn |
![]() |
| Thread Tools | |
| Display Modes | |
| |