Check the recordcount of a combo Box If 0 set additions to false
Hello, I have a combobox (cbo1) that its row source is a sql that allows me to select data and for the next record the data selected previousl wont show in the combo box. This happens for each record until there isn't any data to select in the combo box. I want to set additions to false when there isn't any data in the combo. I tried:
Code:
Private Sub cboComponent_Dirty(Cancel As Integer)
If cboComponent.RecordsetClone.RecordCount > 1 Then
Cancel = True
Else
Me.AllowAdditions = False
End If
End Sub