Hello
I was hoping someone could possibly tell me where I am going wrong with MS Access. I have created a form which has a certain number of area's which have check boxes some area's have two check boxes and some have three. The check boxes are labelled as Yes, No or n/a. The two check box fields have Yes and No as answers and the three check boxes have Yes, No and n/a. I have set the default value of the check boxes to Null. I am trying to implement a validation rule which will only allow one of the boxes to be checked at any given time. I can get it to validate the following
No box checked (User is not able to select either Yes or n/a)
n/a box checked (User is not able to select either Yes or No)
I have attached the formula I have used.
(Earthing1Yes, Earthing1No and Earthing1na) are the field names.
No Formula
=IIf([Earthing1No] And [Earthing1na]=True Or [Earthing1na] And [Earthing1Yes]=True=True,Null,True)
n/a Formula
=IIf([Earthing1No] And [Earthing1na]=True Or [Earthing1Yes] And [Earthing1na]=True=True,Null,True)
Yes Formula
=IIf([Earthing1No] And [Earthing1Yes]=True Or ([Earthing1na] And [Earthing1Yes]=True)=True,Null,True)
but when the Yes box is checked the User can check the No box but not the n/a box. I have tried putting each of the seperate expressions in brackets but it still has the same effect. Why is this happening?
I was hoping someone could possibly tell me where I am going wrong with MS Access. I have created a form which has a certain number of area's which have check boxes some area's have two check boxes and some have three. The check boxes are labelled as Yes, No or n/a. The two check box fields have Yes and No as answers and the three check boxes have Yes, No and n/a. I have set the default value of the check boxes to Null. I am trying to implement a validation rule which will only allow one of the boxes to be checked at any given time. I can get it to validate the following
No box checked (User is not able to select either Yes or n/a)
n/a box checked (User is not able to select either Yes or No)
I have attached the formula I have used.
(Earthing1Yes, Earthing1No and Earthing1na) are the field names.
No Formula
=IIf([Earthing1No] And [Earthing1na]=True Or [Earthing1na] And [Earthing1Yes]=True=True,Null,True)
n/a Formula
=IIf([Earthing1No] And [Earthing1na]=True Or [Earthing1Yes] And [Earthing1na]=True=True,Null,True)
Yes Formula
=IIf([Earthing1No] And [Earthing1Yes]=True Or ([Earthing1na] And [Earthing1Yes]=True)=True,Null,True)
but when the Yes box is checked the User can check the No box but not the n/a box. I have tried putting each of the seperate expressions in brackets but it still has the same effect. Why is this happening?