Bypassing Validation rule on form ??

Franky G

Registered User.
Local time
Today, 21:34
Joined
Feb 6, 2001
Messages
62
Hi all,

I have a button which I use to clear various fields, as below.

Private Sub Clear_Form_Command_Button_Click()
Me.From_Date = Null
Me.Until_Date = Null
Me.Description_Text = Null
Me.Area_Team = Null
Me.Requery
End Sub

trouble is, when either of the date fields fails to meet the Validation rule (>=#01/01/1998# And <=Date()) or the input mask (99/99/0000;0;_), Access insists that I correct the date before do anything else, including using my 'Clear Form' button!

Is there any way that the validation rule and the input mask can be bypassed when I press the Clear form button?

Thanks

Frank G
 
Try adding something like the following:

'Or Is Null' or
'Or IsNull' or
(<your expression> Or Is Null)

to the expression.

Hope it helps,
norm
 

Users who are viewing this thread

Back
Top Bottom