Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Boxes 1

Status
Not open for further replies.

luceze

Programmer
Apr 26, 2001
842
0
0
US
Does anyone know the code that when one check box is checked the other becomes unchecked.
For example in a table I have two fields that are either yes or no. If one field is yes the other has to be no.
In a form I have two check boxes that their control source are these fields. So when a record comes up one of the check boxes is always yes and one is always no. I would like for the user when checking one of the boxes the other is automatically unchecked. I can do it in Excel but not in Access.

Thanks for the help,
Eric
Access2000
 
The easiest way to create this behavior is an option group with two check boxes in it. The value of the option group will be either 1 or 2, depending on which box is checked. You can set one of them as the default.
 
Cha-Ching! I learn something new everyday.
thanks.
 
Another option is:

Checkbox1 = Not Checkbox2
Checkbox2 = Not Checkbox1

This works for any true/false fields.

mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top