PC Review


Reply
Thread Tools Rate Thread

Character Len Count

 
 
The Report Guy
Guest
Posts: n/a
 
      8th Jan 2008
Hi,

I comments txt field with a max character of 255. I like to have on my form
letting the user know the number of characters that the user has entered.

I try the Len([comments]) but that only works after they moved on to another
field. I need the field to instantly know the number of characters as they
type.

Any suggestions.

Thanks
 
Reply With Quote
 
 
 
 
Dale Fye
Guest
Posts: n/a
 
      8th Jan 2008
You can use the forms current event to initially compute the number of
characters remaining using the controls Value property, but once the control
has the focus, you will need to use the Text property to get the current
number of characters. Use the controls Change event and the Text property to
display the number of characters used or remaining. The text property is
only available while that control has the focus, so it is ideal for use in
the change event.

Something like:

Private Sub txt_SomeField_Change

me.lbl_SomeField_Length.Caption = 255 - len(me.txt_SomeField.Text) & "
characters remaining"

End Sub

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



"The Report Guy" wrote:

> Hi,
>
> I comments txt field with a max character of 255. I like to have on my form
> letting the user know the number of characters that the user has entered.
>
> I try the Len([comments]) but that only works after they moved on to another
> field. I need the field to instantly know the number of characters as they
> type.
>
> Any suggestions.
>
> Thanks

 
Reply With Quote
 
fredg
Guest
Posts: n/a
 
      8th Jan 2008
On Tue, 8 Jan 2008 09:24:03 -0800, The Report Guy wrote:

> Hi,
>
> I comments txt field with a max character of 255. I like to have on my form
> letting the user know the number of characters that the user has entered.
>
> I try the Len([comments]) but that only works after they moved on to another
> field. I need the field to instantly know the number of characters as they
> type.
>
> Any suggestions.
>
> Thanks


Code the Comments Change event:
Me![ShowCountControl] = Len(Me![Comments].Text)
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
The Report Guy
Guest
Posts: n/a
 
      8th Jan 2008
Thanks guys... that helps

"fredg" wrote:

> On Tue, 8 Jan 2008 09:24:03 -0800, The Report Guy wrote:
>
> > Hi,
> >
> > I comments txt field with a max character of 255. I like to have on my form
> > letting the user know the number of characters that the user has entered.
> >
> > I try the Len([comments]) but that only works after they moved on to another
> > field. I need the field to instantly know the number of characters as they
> > type.
> >
> > Any suggestions.
> >
> > Thanks

>
> Code the Comments Change event:
> Me![ShowCountControl] = Len(Me![Comments].Text)
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Character Count? =?Utf-8?B?QmVueg==?= Microsoft Excel Programming 0 27th Mar 2007 11:53 PM
Excel Count characters in a textbox to display character count? Shaka215@gmail.com Microsoft Excel Programming 1 8th Feb 2007 06:31 AM
character count =?Utf-8?B?YmVu?= Microsoft Excel Programming 2 26th Jun 2006 04:30 PM
Updating character count as user types each character refer_to_website@nospam.com Microsoft Dot NET 9 20th Feb 2004 10:43 PM
Count Character bw Microsoft Access Form Coding 6 26th Jan 2004 01:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:53 PM.