If Statement

  • Thread starter Thread starter DS
  • Start date Start date
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
 
Set a break point on the If Me.TxtItemID = 30 Then and see what Access
thinks actually is the value of TxtItemID.
 
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
 
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.
 
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
 
Back
Top