I am a novice with VBA code. My current challenge is getting data validation to work how I'd like. Here's my problem...
- I am trying to validate entries in a TextBox to be sure the user enters a numeric value
- I've place my validation code in the BeforeUpdate event handler
- The code catches the error as planned.
- The problem I'm having is that I cannot exit the form to abort entry OR clear all fields to start over without the validation running without end.
This is a sample of my code:
- If the user enters a numeric value, the validation stops
- If a user leaves the TextBox empty and tries to close or reset the form fields, the message box keeps popping up and the validation loops until the form is "X"d out. Then it runs two more times before the form closes.
Having the validation loop if the user would like to continue to the other fields in the form and complete the input is okay. The problem is is the user decides that they would like to exit the form and abort the entry. The validation won't stop.
I have other TextBoxes on the form that have the same issue. I believe they all have the same problem
I will appreciate any assistance to identify the code I'm missing to allow a user to abort the entry and close the form.
Bookmarks