If the table has date/time as the data type and the text box is formatted
mm/dd/yyyy then any legitimate date will show in the format you want. If the
user enters 1/28, however, Access will change it to 01/01/1928. On the other
hand, if the user enters 1/2 Access will assume the current year and change
it to 01/02/2005. 1/1/4 becomes 01/01/2004. An input mask for a date is
sort of redundant since you can establish a date format. If you must have
one then 00/00/00;;* is as good as anything, I suppose, along with the
mm/dd/yyyy format. A two-digit year will automatically resolve itself to a
four-digit year without generating unnecessary errors. I would leave out the
0 after the first semi-colon, as there is no need I can see to store literal
values.
In my experience most users prefer a format that allows them to enter the
minimum amount of information. You may want to reconsider requiring eight
keystrokes for 02/05/2005 when 2/5 will accomplish the same thing.
Having said all that, the user applying an incorrect format generates an
error, but your error handling code is apparently incorrect. It is not the
error itself that opens the debugger but rather the procedure the code is
attempting to follow. It never gets a chance to run through all of the
instructions before it encounters some VBA no-no. It could just be some
simple formatting. Why don't you post the full AfterUpdate code? This
shouldn't be as complicated as it has become.