supress null value warnings

Local time
Yesterday, 19:28
Joined
Feb 25, 2008
Messages
410
I am trying to supress the null field warnings for a form if the user starts to enter information but then clicks the "find request" or "new request" buttons.

Any way to do that?
 
Could try DoCmd.SetWarnings False/True.

Would Seem that your text box is bound??
Would be better to suppress the buttons until data is entered or alter the search criteria.

But not knowing your form this is all a guess.
 
Okay, well I tried to put DoCmd.SetWarnings False
in the click event of the buttons (didn't work)
also tried it in Form_Current event (didn't work)
also tried it in Form_load event (didn't work)

The fields are bound.

when the user opens the form, it opens with a new record for input.

if the user starts to type info in a field but does not complete all required fields, and then they click find request or new request, they will get errors from the required fields that were left blank.

any thoughts?
 
RossWindows said:
If the user starts to type info in a field but does not complete all required fields, and then they click find request or new request, they will get errors from the required fields that were left blank.
That's sort of the whole idea behind "required fields" isn't it? Either a field is required, and has to be filled in with data, or it's not required, and can be left blank! You can't have it both ways, and you can't and shouldn't simply suppress the Null value warnings when you feel like it! If you don't want the fields to be required, undo whatever you've done to designate them as required.
 
Yeah I know. I figured it wouldn't be easy, but I know there must be a way...

I figured there must be a way to simply discard the partial information, and let the user click "find request" or "new request" without getting bombarded by error msgs.
 
In the code of the OnClick event of your two buttons, try

If Me.Dirty Then Me. Undo

before executing the rest of the code you already have there.
 
WooHooo!!
I love you missinglinq !

not like that... but you know what I mean!

Thank You
 

Users who are viewing this thread

Back
Top Bottom