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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Code Is Slow 3
Code Is Slow 6
Loop Problem 5
Correct use of IF ElseIf 5
Comma In VBA Value List 15
Math Rules 14
Code Confusion 10
Count() 5

Back
Top