This is something I've always had trouble with, and it comes up fairly frequently...
I have a continous form with a single text field and next to this text field, I have a caption that maintains the number of characters the user can type into the text field before they reach maximum (the number decreases with every key stroke). It looks like this:
Text In Field Here 18
I use this function to keep count of the characters remaining in the text field.
This system works fine if I have a single field and caption on a single form.
If I have a single field and caption on a continuous form, the caption on every line updates based on the current text field getting the data.
How do I get the captions to display the correct character numbers for each line in a continuous form?
Thanks,
Adam
I have a continous form with a single text field and next to this text field, I have a caption that maintains the number of characters the user can type into the text field before they reach maximum (the number decreases with every key stroke). It looks like this:
Text In Field Here 18
I use this function to keep count of the characters remaining in the text field.
Code:
Function pfnCalcCharactersRemainingInField(intMaxCharactersAllowed As Integer) As Integer
'calculate how many characters you can enter before you reach intMaxCharactersAllowed
Dim C As Control
Set C = Screen.ActiveControl
pfnCalcCharactersRemainingInField = intMaxCharactersAllowed - Len(C.Text)
End Function
If I have a single field and caption on a continuous form, the caption on every line updates based on the current text field getting the data.
How do I get the captions to display the correct character numbers for each line in a continuous form?
Thanks,
Adam
Comment