Can you display remaining character space?

  • Thread starter Thread starter Chris Nebinger
  • Start date Start date
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.
 
-----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))
 
Back
Top