If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with table design
Hi,
Recently, I start a small database for my shop selling electrical appliances... The database run fairly good, but still a have a question. Some items had two pricing, one for retail and one for package (eg Electric wire sold in roll of 50m or retail for 10 or 15 mt). How do I defines multiple pricing for this purpose (possibly when user select one item, Access should ask for choice of SalePrice?). I have 3 tables below tblItems ItemID, BarCode, Description, SalePrice tblTransaction TransactionID, TranDate, ReceiptNum tblTransactionDetails TransactionID, ItemID(FK),Qty,UPrice, Discount(%) Appreciate for any advice from this NG SF |
#2
|
|||
|
|||
Help with table design
suggest you split your tblItems into two tables, and add an additional
table: tblItems ItemID (primary key, i assume) BarCode Description tblPriceTypes TypeID (primary key) TypeName (such as "Retail", "Package", "Christmas Sale 2005", whatever you need) tblItemPrices PriceID (primary key) ItemID (foreign key from tblItems) TypeID (foreign key from tblPriceTypes) Price each item in tblItems can have as many prices as you need to assign. when a record is entered in tblTransactionDetails, you can pick the "correct" price from tblItemPrices - filtered to show only the prices assigned to that item. (you may want to continue to "hard-code" the price into each record in tblTransactionDetails, so that you don't have to create a more complex setup to accommodate changes in the "standard" prices of an item.) hth "SF" wrote in message ... Hi, Recently, I start a small database for my shop selling electrical appliances... The database run fairly good, but still a have a question. Some items had two pricing, one for retail and one for package (eg Electric wire sold in roll of 50m or retail for 10 or 15 mt). How do I defines multiple pricing for this purpose (possibly when user select one item, Access should ask for choice of SalePrice?). I have 3 tables below tblItems ItemID, BarCode, Description, SalePrice tblTransaction TransactionID, TranDate, ReceiptNum tblTransactionDetails TransactionID, ItemID(FK),Qty,UPrice, Discount(%) Appreciate for any advice from this NG SF |
#3
|
|||
|
|||
Help with table design
Thank you for your prompt response. I appreciate it.
SF "tina" wrote in message ... suggest you split your tblItems into two tables, and add an additional table: tblItems ItemID (primary key, i assume) BarCode Description tblPriceTypes TypeID (primary key) TypeName (such as "Retail", "Package", "Christmas Sale 2005", whatever you need) tblItemPrices PriceID (primary key) ItemID (foreign key from tblItems) TypeID (foreign key from tblPriceTypes) Price each item in tblItems can have as many prices as you need to assign. when a record is entered in tblTransactionDetails, you can pick the "correct" price from tblItemPrices - filtered to show only the prices assigned to that item. (you may want to continue to "hard-code" the price into each record in tblTransactionDetails, so that you don't have to create a more complex setup to accommodate changes in the "standard" prices of an item.) hth "SF" wrote in message ... Hi, Recently, I start a small database for my shop selling electrical appliances... The database run fairly good, but still a have a question. Some items had two pricing, one for retail and one for package (eg Electric wire sold in roll of 50m or retail for 10 or 15 mt). How do I defines multiple pricing for this purpose (possibly when user select one item, Access should ask for choice of SalePrice?). I have 3 tables below tblItems ItemID, BarCode, Description, SalePrice tblTransaction TransactionID, TranDate, ReceiptNum tblTransactionDetails TransactionID, ItemID(FK),Qty,UPrice, Discount(%) Appreciate for any advice from this NG SF |
#4
|
|||
|
|||
Help with table design
you're welcome
"SF" wrote in message ... Thank you for your prompt response. I appreciate it. SF "tina" wrote in message ... suggest you split your tblItems into two tables, and add an additional table: tblItems ItemID (primary key, i assume) BarCode Description tblPriceTypes TypeID (primary key) TypeName (such as "Retail", "Package", "Christmas Sale 2005", whatever you need) tblItemPrices PriceID (primary key) ItemID (foreign key from tblItems) TypeID (foreign key from tblPriceTypes) Price each item in tblItems can have as many prices as you need to assign. when a record is entered in tblTransactionDetails, you can pick the "correct" price from tblItemPrices - filtered to show only the prices assigned to that item. (you may want to continue to "hard-code" the price into each record in tblTransactionDetails, so that you don't have to create a more complex setup to accommodate changes in the "standard" prices of an item.) hth "SF" wrote in message ... Hi, Recently, I start a small database for my shop selling electrical appliances... The database run fairly good, but still a have a question. Some items had two pricing, one for retail and one for package (eg Electric wire sold in roll of 50m or retail for 10 or 15 mt). How do I defines multiple pricing for this purpose (possibly when user select one item, Access should ask for choice of SalePrice?). I have 3 tables below tblItems ItemID, BarCode, Description, SalePrice tblTransaction TransactionID, TranDate, ReceiptNum tblTransactionDetails TransactionID, ItemID(FK),Qty,UPrice, Discount(%) Appreciate for any advice from this NG SF |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with relationship plase | Rock | General Discussion | 5 | July 4th, 2005 03:54 AM |
Seeking some expert advice. | HD87glide | Using Forms | 14 | March 23rd, 2005 10:11 PM |
unable to repair inobox | Sudheer Mumbai | General Discussion | 1 | February 20th, 2005 11:55 AM |
Update - If statement | Dan @BCBS | Running & Setting Up Queries | 13 | December 14th, 2004 06:02 PM |
Autonumber | Ally H. | General Discussion | 7 | August 27th, 2004 04:51 PM |