I am having a problem on a subform…..
Here are the fields are:
Okay here is where I am….I am inputting data in this subform. The user will select a value from the ItemCombo. I then execute the following code:
- ItemCombo (unbound)
- Description (unbound)
- Price (unbound)
- Id (hidden) (Table Field)
- Item Code (Table Field)
Private Sub ItemCode_Change()
Description = DLookup("[Description ]", "Item Code", "[ID] = " & Me!ItemCode)
Part = DLookup("[Part ]", "Item Code", "[ID] = " & Me!ItemCode)
Price = DLookup("[Price ]", "Item Code", "[ID] = " & Me!ItemCode)
End Sub
Right now I get something like this if I were to enter 3 rows of data:
ItemCombo Description Price ID Item Code
Item1 Descripton3 12.33 1 Item1 (Should Be Description 1 12.31)
Item2 Descripton3 12.33 2 Item2 (Should Be Description 2 12.32)
Item3 Descripton3 12.33 3 Item3 (Should Be Description 3 12.33)
How do I get the Description and price to match the item combo field?
Thanks!