View Full Version : Help with form controls


spalmateer
06-28-2001, 01:42 PM
I have a checkbox and a combobox on my form. I would like the user to be able to choose a selection from the combobox , resulting in the checkbox being checked. Also if the checkbox is unchecked by the user, I would like the form to clear the entry in the combobox. Thanks for any help with these problems!

D-Fresh
06-29-2001, 03:54 AM
Just put these two functions on your form in the AfterUpdate event of the combo box and the Click of the checkbox.

Private Sub chkBox_Click()
If Me!chkBox = False Then
Me!cmbBox = Null
End If
End Sub

Private Sub cmbBox_AfterUpdate()
Me!chkBox = True
End Sub

Where chkBox is your Checkbox and cmbBox is your ComboBox. Hope that helps.

Doug