A
a
Hi
I am trying to make a price field (Dup_Price) in a subform take on 2
different sets of prices depending on the value selected from the Order
field (which has 2 options - "Takeaway" & "Dining In" and is on the form
Frm_Orders).
The following code appears in the after update event of the ProductCode
field which is a combo box with the row source containing 4 sets of data .
Column contains 0 ProductCode, Column 1 ProductName, Column 2 price set 1,
column 3 contains price set 2.
Private Sub ProductCode_AfterUpdate()
If Forms!Frm_Orders!Order = "Takeaway" Then
Me.Dup_Price = Me.ProductCode.Column(2)
Else
Me.Dup_Price = Me.ProductCode.Column(3)
End If
End Sub
The correct price only works if "Takeaway" is selected in the Order field.
If "Dining In" is selected then nothing appears in the Dup_Price field, it
appears blank.
Any ideas as to what im doing wrong?
Many thanks in advance
Pinky
I am trying to make a price field (Dup_Price) in a subform take on 2
different sets of prices depending on the value selected from the Order
field (which has 2 options - "Takeaway" & "Dining In" and is on the form
Frm_Orders).
The following code appears in the after update event of the ProductCode
field which is a combo box with the row source containing 4 sets of data .
Column contains 0 ProductCode, Column 1 ProductName, Column 2 price set 1,
column 3 contains price set 2.
Private Sub ProductCode_AfterUpdate()
If Forms!Frm_Orders!Order = "Takeaway" Then
Me.Dup_Price = Me.ProductCode.Column(2)
Else
Me.Dup_Price = Me.ProductCode.Column(3)
End If
End Sub
The correct price only works if "Takeaway" is selected in the Order field.
If "Dining In" is selected then nothing appears in the Dup_Price field, it
appears blank.
Any ideas as to what im doing wrong?
Many thanks in advance
Pinky