You might have to take car of copying and pasting more tha 500 characters into the Textbox. The following code worked for me in the key up event. You may handle the oversize problem differently, I just used the left most 499 chars and put a # on the end.
Dim FieldStr As String
FieldStr = Me!textField.Text
If Me!Label6.Caption = "FULL" Then
If Len(FieldStr) <= 500 Then
Me!Label6.Caption = 1 '500 - Len(FieldStr)
Me!Label6.ForeColor = 255
Else
MsgBox "No Characters Left truncating data", vbCritical + vbOKOnly, "Field Size Limit Approaching"
Me!Label6.Caption = "FULL"
Me!Label6.ForeColor = 255
Me!textField.value = Left(FieldStr, 499) & "#"
End If
Else
Select Case Len(FieldStr)
Case Is < 490
Me!Label6.Caption = 499 - Len(FieldStr)
Me!Label6.ForeColor = 0
Case 490
MsgBox "Ten Characters Left", vbInformation + vbOKOnly, "Field Size Limit Approaching"
Me!Label6.Caption = 499 - Len(FieldStr)
Me!Label6.ForeColor = 255
Case Is < 499 And Len(FieldStr) > 491
Me!Label6.Caption = 500 - Len(FieldStr)
Me!Label6.ForeColor = 255
Case 499
MsgBox "No Characters Left", vbCritical + vbOKOnly, "Field Size Limit Approaching"
Me!Label6.Caption = "FULL"
Me!Label6.ForeColor = 255
Case Is > 500
MsgBox "No Characters Left truncating data", vbCritical + vbOKOnly, "Field Size Limit Approaching"
Me!Label6.Caption = "FULL"
Me!Label6.ForeColor = 255
Me!textField.value = Left(FieldStr, 499) & "#"
End Select
End If
It's quite an interesting problem. The delete/backspace actions give different lengths of strings to inserting a character so you appear to go from having 2 spare chars to being full. I think you might need to do a bit of playing around with actions at 499 - 501 lengths.
I tried the validation rule but that only operates when you leave the field. Sandy