If it is a bound form, and the text box is bound to an underlying table, in the table definition, set the length to 100.
or if it is not a bound form, or you do not want an access system message then
Private Sub strDefault_BeforeUpdate(Cancel As Integer)
If Len(strDefault) > 100 Then
MsgBox "At 100 characters, exceeds max length allowed"
Cancel = True
End If
End Sub
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.