ecannelora
Programmer
I'm trying to limit the number of characters the user can enter into a text box. The limit should be 255.
considerations:
I don't want to use a validation rule because I don't want the validation text to pop up.
I don't want to use an input mask because it makes typing very messy.
I have a counter to tell the user how many characters he/she has remaining. Code for that is:
Private Sub txtNotes_Change()
Me.txtCharsUsed = 255 - Len(Me.txtNotes.Text)
End Sub
What I'd like to do is something like:
[in psuedo-code]
if len(control.text)>255 then
disallow additions
end if
any ideas?
considerations:
I don't want to use a validation rule because I don't want the validation text to pop up.
I don't want to use an input mask because it makes typing very messy.
I have a counter to tell the user how many characters he/she has remaining. Code for that is:
Private Sub txtNotes_Change()
Me.txtCharsUsed = 255 - Len(Me.txtNotes.Text)
End Sub
What I'd like to do is something like:
[in psuedo-code]
if len(control.text)>255 then
disallow additions
end if
any ideas?