I believe I misunderstood your original post. If so, I apologize.
After re-reading, it sounds like you have two checkboxes, and neither can be
the same value as the other. In other words, if Checkbox1 is True, then
Checkbox2 must be False, and neither can be null.
If so, then you must apply a validation rule at the table level (you could
also do something at the form level, if you prefer). Go to the properties of
the table, and in the Validation Rule enter (replacing field names as needed,
obviously):
(Not IsNull([CheckBox1]) And Not IsNull([CheckBox2]) And ([CheckBox1] = Not
[CheckBox2])
I believe this will accomplish what you want.
In addition, you may want to include a bit of code in the AfterUpdate event
of each CheckBox on the form saying that [CheckBox1] = [Not CheckBox2].
All that said, though, I am not sure of the purpose of having two separate
checkboxes if one's value will *always* be the opposite of the other. Cannot
value 2 be inferred from value 1 using only one checkbox?
In any case, give that a shot.
Jeff
Julius said:
Not sure what I am doing wrong, I change the checkboxes TripleState to Yes
and I applied a Validation Rule to say Is not Null and it the form still
allows me to save without asking for a checkmark in either box. I changed
this in the properties of the yes and no checkboxes, I even tried changing it
in the table where the field is.
:
You can set the TripleState of the CheckBoxes to Yes, and then apply a
Validation Rule to the field that says Not Null.
Jeff
:
I have a form with Yes/No Checkboxes that I want to make required fields.
The catch is I don't want null values I want the user to have to check Yes or
No. I am affraid if I make both required then even if I check the Yes box
the user will be prompt to check the no box. How do I make my checkboxes a
required field with only having to input checkmark in either yes or no. This
is a urgent request. Can someone help me please.