hardhitter06
Registered User.
- Local time
- Today, 03:40
- Joined
- Dec 21, 2006
- Messages
- 600
Hi All,
I created a textbox on a continious form that calculates the total of a particular field (CommAmt) of all records. I have =Sum(CommAmt) as the control source of this textbox.
When this field is 20,000 or over, I would like the form to display an error saying you are over the allowed amt.
I have tried this code on the textbox for Before and AfterUpdate but it isn't working, can someone help me with what I'm doing wrong.
Private Sub Text13_BeforeUpdate(Cancel As Integer)
If Text13 > (19999.99) Then
MsgBox ("Comm Amt excedes limit!")
Cancel = True
End If
End Sub
Thank you.
I created a textbox on a continious form that calculates the total of a particular field (CommAmt) of all records. I have =Sum(CommAmt) as the control source of this textbox.
When this field is 20,000 or over, I would like the form to display an error saying you are over the allowed amt.
I have tried this code on the textbox for Before and AfterUpdate but it isn't working, can someone help me with what I'm doing wrong.
Private Sub Text13_BeforeUpdate(Cancel As Integer)
If Text13 > (19999.99) Then
MsgBox ("Comm Amt excedes limit!")
Cancel = True
End If
End Sub
Thank you.