Limit Number of Characters in Text Box

J

Jonathan Mulder

Is there a text box property that would limit the
number of characters in a text box?
I have an unbound textbox that the user puts string
data into and then I INSERT that into a table record. If
the length of the string data exceeds the field length, I
get an error message.
Would it be something in the "Input Mask" property of
the textbox?
Or should I dim my string variable as a certain length
like:
Dim strTextBoxVariable as String * 60

Thanks for any helpful advice!
Jonathan Mulder
Red Bluff, CA
 
F

fredg

Is there a text box property that would limit the
number of characters in a text box?
I have an unbound textbox that the user puts string
data into and then I INSERT that into a table record. If
the length of the string data exceeds the field length, I
get an error message.
Would it be something in the "Input Mask" property of
the textbox?
Or should I dim my string variable as a certain length
like:
Dim strTextBoxVariable as String * 60

Thanks for any helpful advice!
Jonathan Mulder
Red Bluff, CA

Controls have a validation rule property:

Len([ControlName]) <= 20
Also enter a friendly message in the validation text property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top