Two things:
First, the code should go behind the Checkbox, not the ComboBox. So it
would be:
Private Sub Check195_AfterUpdate()
If Check195 = True Then
combo206.Visible = True
Else
combo206.Visible = False
End If
End Sub
Private Sub Form_Current()
If Check195 = True Then
combo206.Visible = True
Else
combo206.Visible = False
End If
End Sub
Secondly, yes, I was assuming a bound checkbox. The code behind the
Checkbox will work with an unbound box, but the OnCurrent code won't work
properly.
By the way, Carl's code will work just as well and is shorter.
Private Sub Check195_AfterUpdate()
Me.combo206.Visible = Me.Check195
End Sub
Private Sub Form_Current()
Me.combo206.Visible = Me.Check195
End Sub
I use my way because I think it is easier to understand for someone else to
modify later. Personal preference.
--
--Roger Carlson
MS Access MVP
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L