jwjjwj
asked on
Count the characters entered in an MSAccess field and report the remaining characters to another field
I would like to count the number of characters entered in a access field, using VBA.
The field I wish to count is called FDDATA and is a text field of 255 characters.
I wish to show the person inputing how may characters remain for input counting down from 255 and display this result in an unbound field called fldCounterRemaining
I would like to allow for deletions and backspaces to be taken into account.
Could some give me a working routine.
Thanks in advance
The field I wish to count is called FDDATA and is a text field of 255 characters.
I wish to show the person inputing how may characters remain for input counting down from 255 and display this result in an unbound field called fldCounterRemaining
I would like to allow for deletions and backspaces to be taken into account.
Could some give me a working routine.
Thanks in advance
use the LEN function to get the length
len(FDDATA)
len(FDDATA)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much. Works like a dream
you are welcome.
mx
mx
Private Sub Text6_Change()
Me.Text8 = "Remaining: " & 250 - Len(Me.Text6.Text)
DoEvents
End Sub
mx