Jun 18, 2007 #1 jase2006 Technical User Nov 17, 2006 53 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.
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.
Jun 18, 2007 1 #2 Remou Technical User Sep 30, 2002 13,030 BE 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] Upvote 0 Downvote
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]
Jun 19, 2007 Thread starter #3 jase2006 Technical User Nov 17, 2006 53 GB 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. Upvote 0 Downvote
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.
Jun 19, 2007 Thread starter #4 jase2006 Technical User Nov 17, 2006 53 GB Actually I've got another problem related to this. Is there a way to add spaces and return characters to the count? Upvote 0 Downvote
Actually I've got another problem related to this. Is there a way to add spaces and return characters to the count?
Jun 19, 2007 #5 Remou Technical User Sep 30, 2002 13,030 BE Yes, get rid of the Trim function. Upvote 0 Downvote
Jun 19, 2007 Thread starter #6 jase2006 Technical User Nov 17, 2006 53 GB Duh, I feel so slow today. Thanks again Remou! Upvote 0 Downvote