I have a function that checks the length of a string entered in a textbox. It checks to see if it is within the max field length and if not, alerts the user. I have a password field where I want to be able to limit the number of characters entered. My code is in the LostFocus() portion of the textbox:
If (Len(SendingForm.Controls(TextBoxName).Text) > maxfieldlength) Then
Sometimes Access gives me a "Microsoft Access cannot retrieve the value of this property" error. I have tried removing the .Text portion, but then it doesn't give me the right number. Is there any way around this? The textbox has the password input mask on it.
If (Len(SendingForm.Controls(TextBoxName).Text) > maxfieldlength) Then
Sometimes Access gives me a "Microsoft Access cannot retrieve the value of this property" error. I have tried removing the .Text portion, but then it doesn't give me the right number. Is there any way around this? The textbox has the password input mask on it.