BeforeUpdate Vailidation for a Date (1 Viewer)

wilderfan

Registered User.
Local time
Today, 10:13
Joined
Mar 3, 2008
Messages
172
I have a validation check in the BeforeUpdate event for a textbox on a form. (It's a bound textbox used to fill in dates.)

I am using Cancel = True to keep the focus on the textbox used for inputting dates.

QUESTION: Is there a way for the previous date to be cleared? (FYI, I'm using ACCESS 2007 and Date Picker is in effect for this textbox).

I would prefer the incorrect date to disappear if that's possible. Right now the user has to click Esc in order to clear the incorrect date from the textbox.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 03:13
Joined
Aug 29, 2005
Messages
8,263
You could put;
Code:
Me.ControlName.Undo
in the line after Cancel = true
 

wilderfan

Registered User.
Local time
Today, 10:13
Joined
Mar 3, 2008
Messages
172
Thanks, John.

It works great.
 

Users who are viewing this thread

Top Bottom