Your code as shown should work (it did for me).
So, what could be wrong?
Does the Source of your combo box have more than 1 column.
Look at the Properties of your Combo box. On the format tab, How many
columns are there?
If more than 1 column, in Column Widths does it look like this 0";1";1; ?
If so your Combo box is displaying Column 2 but is probably bound to the
first (hidden - 0 length) column.
I suspect this is the case as Access tries to hide the first column if it is
a primary key.
If so, your code should read like this (to confuse matters further, when it
comes to vba the first column of a combo box is 0, the second column is 1,
etc.)
Private Sub Combo43_AfterUpdate()
If Me.Combo43.column(1) = "Reference 1" Then
Me.Check32 = True
Else
Me.Check32 = False
End If
End Sub
Good Luck
Len Robichaud
<ke********@gmail.comwrote in message
news:11*********************@d30g2000prg.googlegro ups.com...
>I have a form (Form1) with a combo box (Combo43) with three values:
Reference 1
Antenatal 1
Quant 1
I also have two check boxes (check36 and check34)
What is the best way to implement such that when Reference 1 is
selected in the combo box, check34 changes from false to true, and
when Antenenal 1 or quant 1 is selected, check 36 changes to true?
I've tried something along the lines of:
Private Sub Combo43_AfterUpdate()
If Me.Combo43 = "Reference 1" Then
Me.Check32 = True
Else
Me.Check32 = False
End If
End Sub
I'm a beginner at this, so any help would be amazing. Thanks!