active count of string

Posted on 2009-02-12
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
Question by:smurfer69
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Try this:


    LVL 119

    Accepted Solution

    use the change event of the textbox

    private sub TXT_MSG_Change()

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

    end sub


    Author Comment

    That caused and error

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now