NascarBaritone
Registered User.
- Local time
- Today, 14:29
- Joined
- Sep 23, 2008
- Messages
- 75
I am totally stumped on this one, so it probably means it's an easy answer. 
I have two textbox on my report that receive data from an Excel spreadsheet that is imported into my table:
Principal Amount
Commission Amount
I want to fill another textbox with a "Red Flag" if the Commission Amount is 3% or greater than the Principal Amount. I have successfully done that with this code:
However, if the product was sold (not bought) the Principal Amount is a negative value and the code views any commission as being greater than 3%.
For example:
[Principal Amount] of -17932.76 * 0.03 = -537.98
[Commission Amount] of 257.58
The above code views this as greater than 3%, but it obviously is not.
Suggestions?

I have two textbox on my report that receive data from an Excel spreadsheet that is imported into my table:
Principal Amount
Commission Amount
I want to fill another textbox with a "Red Flag" if the Commission Amount is 3% or greater than the Principal Amount. I have successfully done that with this code:
Code:
If Me.Commission_Amount.Value >= Me.Principal_Amount.Value * 0.03 Then
Me.txtRedFlag8.Value = "- The Commission of the trade was 3% or greater."
Else
Me.txtRedFlag8.Value = ""
End If
However, if the product was sold (not bought) the Principal Amount is a negative value and the code views any commission as being greater than 3%.
For example:
[Principal Amount] of -17932.76 * 0.03 = -537.98
[Commission Amount] of 257.58
The above code views this as greater than 3%, but it obviously is not.
Suggestions?