Select Case for "Yes/No" box

T

Tdahlman

I have a field that is a "Yes/No" and on my form it shows up as a check box.
I want to write Select Case where if the box is check then another box is
visible in my form. If the box is unchecked the box is NOT visible. I
understand how to write the code I just don't know what to use for the values
of the box if it's checked or uncheck.

What is the value of an checked box?
What is the value of a unchecked box?

Thanks in Advance,
Travis
 
B

Beetle

What is the value of an checked box?

True or -1
What is the value of a unchecked box?

False or 0

But you don't need a Select Case statement. You can do this with one
line of code;

Me!YourOtherControl.Visible = Me!YourCheckbox

Put that line of code in the After Update event of your check box and
in the Current event of your form.
 
T

Tdahlman

That is excellent. That works better then what I had and it's shorter.
Thank you very much.
 

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