text limitation/validation

K

Kaylen

Is there a way to show a user of a database how many characters they have
left in a field. I want to limit 255 character for a "notes" field so I am
wondering if there is a way to allow the users to see how many characters
they have entered out of the 255 characters allowed?
 
J

John W. Vinson

Is there a way to show a user of a database how many characters they have
left in a field. I want to limit 255 character for a "notes" field so I am
wondering if there is a way to allow the users to see how many characters
they have entered out of the 255 characters allowed?

Well... you can avoid the problem by using a Memo datatype rather than Text;
that will give them 65536 characters.

Alternatively, you can use the textbox's Change event, which fires at every
keystroke. If you have a textbox on the form named RoomLeft you can use

Private Sub Notes_Change()
Me!RoomLeft = 255 - Len(Me!Notes)
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

Similar Threads


Top