Thank you for your reply....
I have actually decided to include the restriction on the save button of the form and not as a private sub.
Thank you for your reply....
I have actually decided to include the restriction on the save button of the form and not as a private sub.
Last edited by MrBlackd; 11-15-2013 at 03:29 PM.
The Exit event fires when the focus leaves the TextBox... setting Cancel=True literally cancels the exiting of the TextBox and the cursor remains in the TextBox until the user enters a proper date. Since I did not want to trap the user in there forever (assuming they did not know what a proper date was), I allow the TextBox to be exited if it is empty. If you did not want to do that (in other words, allow the program to go on with bad data assuming the user does not heed the MessageBox's advice by correcting the data), then remove the Cance=True statements.
I understand, no need though to remove the statements since as mentioned in my previous (edited) post I have decided to include the restrictions in the save button of the form.
But thanks for letting me know for future use, since I would not want the program to go on with bad data either.
Your help was valuable!
Bookmarks