Input mask

M

Maracay

Hi Guys

I have and unbound text box, the lenght is 150, how can I create and input
mask this big to allow, letter, numbers and special characters, I don't want
the user to type more that 150 characters because I need to store the
information in a table field 150 lenght.

Thanks
 
A

Amy E. Baggott

You should be able to do this by using the Validation Rule property of the
text box. Set it to

= Len([fieldname] <=150

where fieldname is the name of the field you're in. Then set the Validation
Text to tell them what to do about it.
 
J

John W. Vinson

Hi Guys

I have and unbound text box, the lenght is 150, how can I create and input
mask this big to allow, letter, numbers and special characters, I don't want
the user to type more that 150 characters because I need to store the
information in a table field 150 lenght.

Thanks

No input mask is needed or appropriate. If the length of the field is 150,
that's all the user will be able to store anyway.

You can use the textbox's Change event to alert the user that they're out of
room (or running out); e.g. you could have an unbound textbox txtLeft on the
form, and use code like

Private Sub MyBigTextbox_Change()
Me.txtLeft = 150 - Len(Me!MyBigTextbox.Text)
If Me.txtLeft <= 0 Then
MsgBox "You're being prolix and excessively verbose!", vbOKOnly
End If
End sub
 

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