Can you display remaining character space?

C

Chris Nebinger

I just used this in the OnChange event:

Me.Requery
Text0.SelStart = Len(Nz(Text0, ""))
Text2 = "Characters Remaining: " & 255 - Len(Nz
(Text0, ""))


Chris Nebinger

-----Original Message-----
I have a 255 size text field and would like to display
the remaining character size as the users type (like my
cell phone does). How can this be done?
I tried doing 255-Len(Nz(Mycontrol.value)) and it only
works when you move off of the control. I put the event
in just about every procedure (keypress, dirty, etc.) to
no avail.
 
M

Marshall Barton

-----Original Message-----
the remaining character size as the users type (like my
cell phone does). How can this be done?
works when you move off of the control. I put the event
in just about every procedure (keypress, dirty, etc.) to
no avail.


While data is being entered into the text box, you need to
use code in the text box's Change event. Furthermore, you
have to get its Text property, not its Value.

Me.txtRemaining = 255 - Len(Nz(Mycontrol.Text, 0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top