If Statement

D

DS

This If Statement always returns "Already Discounted"
I need it to return "Can't Discount a Discount" if the itemID = 30
etc...

If Me.TxtItemID = 30 Then
DoCmd.OpenForm "frmMsgWarning"
Forms!frmMsgWarning!TxtMsg = "CAN'T DISCOUNT A DISCOUNT"
ElseIf Me.TxtOnce >= 1 Then
DoCmd.OpenForm "frmMsgWarning"
Forms!frmMsgWarning!TxtMsg = "ALREADY DISCOUNTED"
Else
DoCmd.OpenForm "frmFXDiscountSelect"
End If

Thanks
DS
 
D

Douglas J. Steele

Set a break point on the If Me.TxtItemID = 30 Then and see what Access
thinks actually is the value of TxtItemID.
 
D

DS

Douglas said:
Set a break point on the If Me.TxtItemID = 30 Then and see what Access
thinks actually is the value of TxtItemID.
Hi Douglas,
How does one exactly do this?
Thanks
DS
 
D

Douglas J. Steele

Click in the margin to the left of the code.

An alternative would be to put a message box in your code to display the
value.
 
D

DS

Douglas said:
Click in the margin to the left of the code.

An alternative would be to put a message box in your code to display the
value.
Thats a good idea as well.
Thanks
DS
 
Top