We help IT Professionals succeed at work.

active count of string

smurfer69
smurfer69 asked
on
Medium Priority
332 Views
Last Modified: 2012-05-06
I need to have a form which will give an active count of a string length I have one text box to type in and a second text box with this code =(140-len(TXT_MSG), but it will only count when the origional text loses focus, is there a way to have that count show for each character
Comment
Watch Question

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Try this:

=(140-len([TXT_MSG].Text)

mx
CERTIFIED EXPERT
Top Expert 2016
Commented:
use the change event of the textbox

private sub TXT_MSG_Change()

me.text2 = (140 - Len(TXT_MSG.Text))


end sub

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
That caused and error
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.