Can I setup two checkbox so that you can only check one at a time

  • Thread starter Thread starter JonH
  • Start date Start date
J

JonH

I have two fields, both which are yes/no checkbox's. However, for query
purposes on a form, I would like the user to be able to only choose one of
the checkbox's at a time (on a form), preventing them from checking both and
having two many results show up. Is there some sort of expression/macro that
will allow this? Using the option box will not really work for me in this
case since its two different fields.

Thanks!
 
You can put them in an Option Group, or you can put code in their
AfterUpdate events:

Private Sub Check0_AfterUpdate()

Me.Check1 = Not Me.Check0

End If

Private Sub Check1_AfterUpdate()

Me.Check0 = Not Me.Check1

End If
 

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

Back
Top