Happy New Years.
I hope some one can help. I need detailed instructions. I haven't written a data base in about 10 years and I am VERY rusty.
I am creating a database to manage the ordering of supplies for my school clinics. I created a Main form, frmPOinput, with record source: tblPOinfo that has the following fields: OrderID(PrimaryKey & Autonumber), Date, Vendor, StreedAddress, CityStateZip, & VendorNo.
The subform, subfrmPOinput, with record source qryOrders that has the fields: Quantity, ItemNo, Product, UnitPrice, Total, which has control source =IIf(IsNull([Quantity]*[UnitPrice]),0,([Quantity]*[UnitPrice])), & UnitNo.
On the Products field, I have the following code to auto fill the ItemNo and UnitPrice:
Private Sub Product_Change()
'Select a product from the combo box
'and then automatically fill in the
'cataloog number and price per item.
Me.ItemNo = Me.Product.Column(1)
Me.UnitNo = Me.Product.Column(4)
Me.UnitPrice = Me.Product.Column(2)
'to format the price per item as currency
Me.UnitPrice = Val(Product.Column(2))
End Sub
The form and subform are master/child linked by OrderID
Relationships: tblPOinfo[OrderID] 1 to many with tblOrders[OrderID], tblPOinfo[Products] linked to tblProducts[ID], tblPOinfo[Vendor] linked to tblVendor[Vendor], & tblOrders[ID] to qryOrders[ID].
I can enter all of the data into the form and subform and the calculation for the Total works fine and the Vendodr address and Vendor number fill in the fields appropriately. When I save it, the Products field on the both the tblPOInfo and tblOrders has the Item No in it instead of the name of the product. The ItemNo field also displays the Item No.
I hope there is help out there because I am stuck and can't move forward from here.
Thank you.