Check Box or Yes/No fields

E

Eric

I have 2 fields in my table that are yes/no (checkboxes), for each new record
only one checkbox should be checked as the record is either one or the other
and cannot be both. Is there a way to not allow both check boxes to be
checked on the same record?
Thank you,
Eric
 
R

Rick Brandt

Eric said:
I have 2 fields in my table that are yes/no (checkboxes), for each
new record only one checkbox should be checked as the record is
either one or the other and cannot be both. Is there a way to not
allow both check boxes to be checked on the same record?
Thank you,
Eric

Technically, mutually exclusive choices like that should be stored in a
single field.

Instead of...

Field1 Field2
Yes No
No Yes
No Yes

....you use...

FieldName
Value1
Value2
Value2

Then you can use either a ListBox or ComboBox to make the choices (numeric
or text values) or an OptionGroup with two RadioButtons (numeric values
only).

If you insisted on two fields though I believe a Validation Rule on Field1
of <>Field2 might give you what you want.
 
R

Ron2006

If one of them should always be checked then in

field1 afterupdate event

me.field2 = not me.field1




field2 afterupdate event

me.field1 = not me.field2


Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top