If you have assigned each check box to a different field then you have a fair bit of coding to do for this.
The usual approach for selecting exclusive options is to use a single field to hold the result and then use an option group control on a form to provide a set of option buttons. The option group wizard will guide you through the process.
for any given checkbox the code will go in the afterupdate event procedure and will look something like:
sub check1_afterupdate()
If me.check1 = true then
me.check2 = false
me.check3 = false
..etc
me.check6 = false
else
end if
end sub
Note that this will allow all checkboxes to be deselected.
If you must always have one checkbox selected then you must prevent deselection of a checkbox.
If you have set up Yes/No fields to hold the checkbox values then the values will be -1 and 0.
This is fixed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.