Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

character count for textbox 1

Status
Not open for further replies.

jase2006

Technical User
Nov 17, 2006
53
0
0
GB
Can any show me a way to create a display for counting the number of characters being entered into a textbox (real-time) on a form.
 
If you wish to show the count, set the Control Source for a textbox, called, for example, txtCount, to:

[tt]=Len(Trim([txtEnterText].[Text]))[/tt]

Add code to the Change event of txtEnterText:

[tt]Me.txtCount.Requery[/tt]
 
Thanks Remou it works!! No wonder it was not working before, I was using the len() function in the module part instead of control source.
 
Actually I've got another problem related to this. Is there a way to add spaces and return characters to the count?
 
Duh, I feel so slow today. Thanks again Remou!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top