Heenan, Lambert
Lambert.Heenan at AIG.com
Tue Aug 26 08:05:03 CDT 2003
You can trap the error on the *form's* error event, but why bother.? Why even allow users to type a date? If they type 11/1/29 Access will interpret it as Nov 1 2029, but 11/1/30 is going to be taken as Nov 1 1930. I always use a small pop-up form with a calendar on it to collect date input. You could use the MS Calendar control, or use a form that is all native Access textboxes and buttons (as I do). Lambert > -----Original Message----- > From: David Fenton [SMTP:dfe at nudgeeinternational.com] > Sent: Tuesday, August 26, 2003 1:32 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Intercept a date format error > > I know this has been mentioned before but I couldn't find the solution. > > > > I have an unbound textbox control on a form which will receive a date. I > have set the format property of the control to 'Medium date' > > I deliberately type in a ridiculous date to force the following error: > > > > "The value you entered isn't valid for this field". > > > > I want to intercept this error and replace the message box with my own, > but no event seems to be triggering - it's almost as if Access checks the > format before any other event is triggered and I cannot get to that event. > > > > > Please don't tell me I have to remove the format and parse the entered > text (date) in a custom procedure!!! > > > > Hopefully someone has solved this one and can point me to the solution. > > Cheers > David Ô¿Ô¬ > Brisbane Australia > > > << File: ATT3394302.txt >>