Automatically Set Checkbox value based on a combo box value

C

Chris

Hi,

I was wondering if anyone knows how I can go about getting
a checkbox in a form to automatically set to either -1 or
0 based on a value that I choose in a combo box on the
same form. In other words I would like to set the
checkbox value to -1 if I choose one of the values in my
combo box but set it to 0 if I choose any of the other
values in the combo box. The Row source for the combo box
does not lookup to a table but is a list I typed into the
combo box properties under row source. I am able to set
the default value for the checkbox to -1 but cannot figure
out how to build the logic for it to look at the combo box
value to determine whether the checkbox value should be -1
or 0 based on the selection I chose from the combo box.

Any help would be appreciated.
Thx.
 
N

Neil

Chris,

Use the Select Case statement. e.g.

Select Case Me.MyComboName
Case "Peter", "Paul", "Mary"
Me.MyCheckBoxName = True
Case Else
Me.MyCheckBoxName = False
End Select

HTH,

Neil.
 

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