Well Allen, I tried this. The change event does seem to fire with
EACH keystroke inside the text box but the value it uses for the
calculation is always the old value (Me.txtObjectName).
What I need to do is decrement the character counter on EACH keystroke
and update the remaining character count even before the record is
saved. I've tried using the Keypress event but that has it's own set
of problems.
Is there a way to have a real-time display of the remaining characters
as the user types into the field but before they save the record?
Thanks again for all your great contributions to this group.
On Thu, 16 Sep 2004 12:55:37 +0800, "Allen Browne"
<Al*********@SeeSig.Invalid> wrote:
Use the Change event of the text box to count the Len() of the Text
property, and assign the result to an unbound text box:
Private Sub Text1_Change()
Me.Text2 = 255 - Len(Me.Text1.Text)
End Sub
The example assumes there are 255 charaters available. If the control is
bound to a Text field, you could get the number of charaters from:
Me.RecordsetClone.Fields("MyField").Size