Hello Everyone,
I am having a bit of an issue trying to get an order form to function properly with a subform.
I have several tables designed around various things, that will be utilized in an order.
ProdList (Contains ID, ProductName, ProductPartNo, ProdDesc, BrandID, CategoryID)
ProdBrand (Contains ID, BrandName)
ProdCat (Contains ID, CatName)
OrderHeader (Contains ID, CustID, DateMade, StatusID)
OrderDetail (Contains ID, OrderID, ProdId, Qty, UMID)
UnitsMeasure (Contains ID, UnitMeasure)
What I am trying to create is an order form for multiple rows
The user loads the customer information above and then enters in the items they wish to order in the paired subform
[Qty of Item] [UnitMeasure *Dropdown*] [BrandName *Dropdown*] [CatName *Dropdown based on BrandName Selected] [ItemName *Dropdown based on CatName Selected*] [ProdPartNumber *Based on ItemName*] [ProdDesc *Based on ItemName*]
=====
Extra information on the Fields
Qty is a text field, which will save on the Order Detail table.
Units of Measurement is a dropdown field (populated from the UM table) now this field will need to be saved on the Order Detail table but as the ID not the displayed name. Example - UM table has Case, Each, and lets say Gallon. If a user enters in a new item for the order and selects Case, I need to take and store the value as 1 on the Order Detail table (2 for each, 3 for Gallon).
BrandName is a visual dropdown listing off the Brand Names from the ProdBrand table. It has no value to be stored on the Order Detail table but will need to be used for populating dropdowns.
CatName is a visual dropdown listing off the Category Names from the ProdCat table that match the BrandName previously selected. For example, Brand A contains Cat 1A, 2A, 3A. While Brand B contains Cat 1B, 2B, 3B. If I select Brand A in the previous dropdown, I want to only see Cat 1A, 2A, 3A for this dropdown (Outside of a subform I have already gotten this to work via VB-script)
ItemName is a visual and stored dropdown listing off the various items in the Category. The displayed value is the name of the item, however, it will need to store the ID of the item on the Order Detail entry. For example, Item A has an ID of 6 and belongs to Category 1A. So if the user previously selected Brand A and Category 1A, they should be able to select Item A off a dropdown list. When saving the order, it needs to enter the ID of 6 into the Order Detail table.
Product Description is a non-editable text field that displays the Description of the product as provided by the selected Item A. For example: Once the user selects Item A, I want to display Item A's description (held on the same row as Item A in ProdList) on the following field. This value doesn't need to be saved anywhere.
=====
Basically what I am trying to do is create an area to enter in line items for an order.
(Example, Order #1 has 5 different items purchased, I want to save on OrderHeader, the order itself, then on OrderDetail save all 5 lines of items associated to Order #1, the order number.)
Any help/programming would be greatly appreciated, this has been a long standing issue for me, and I need to get it resolved. I have tried numerous things to no avail whatsoever.
Thanks again,
Steven