limit a control

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

I have some fields in a table that are text and size 30. When I use these
fields on a form and type in the control on the form, i can type more than
30 characters. Of course, only the first 30 are saved in the field. How
can I limit the control on the form so that when the 30th character is
typed, I can't type any more?

Karen
 
This is not the normal behavior in Access.

When you type into a control bound to a field, Access will prevent you
typing more characters than the size of the field.

Perhaps your control is unbound? If not, the first step would be to ensure
that you have the latest service pack for your version of Office/Access, and
also SP8 for JET 4. These are available from:
http://support.microsoft.com/gp/sp
 
Karen,

I will assume that any letter, digit, character, or space is valid in the
text box.
This is really simple. In the Input Mask property of the text box, enter 30
C's
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
like that - This will allow no entry or any entry up to 30 characters. If
the user continues to type, no additional characters are accepted. Good idea
to make you text box wide enough the user will notice no more characters are
being accepted.
 
Back
Top