Textbox Character Counter

  • Thread starter User via AccessMonster.com
  • Start date
U

User via AccessMonster.com

I'm trying to display the character count of a textbox in a label.

The format I'm trying to achieve is something like: "1/60 Characters"

60 being the feild size I set for that textbox.

Any help would be great.
 
F

fredg

I'm trying to display the character count of a textbox in a label.

The format I'm trying to achieve is something like: "1/60 Characters"

60 being the feild size I set for that textbox.

Any help would be great.

Using an unbound control:
=Len([ControlName]) & "/60"
 
J

John W. Vinson

I'm trying to display the character count of a textbox in a label.

The format I'm trying to achieve is something like: "1/60 Characters"

60 being the feild size I set for that textbox.

Any help would be great.

Use the Change event of the textbox, which fires at every keystroke. For
example, put an unbound textbox txtChrs on the form, with a label containing
"/60 Characters" as its caption just to the right of the textbox. In the
Change event (and, if you want to see it for existing records, in the form's
Current event too) put

Private Sub yourtextbox_Change()
Me!txtChrs = Len(Me!yourtextbox)
End Sub
 
U

User via AccessMonster.com

Thank you everyone for your help.

I'm using the coding below to achieve the desired result.

------------------------------------------------------------------------------
 

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