I have a combo box that has a default value and it is located on a subform. If I don't select a response from the combo box I want the default value to be entered in the table. Right now it's not recognizing it. I have also tried putting this code in the click event on the main form and it still doesn't work. Any ideas?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.cboEnvironment) Then
Me.cboEnvironment = Me.cboEnvironment.DefaultValue
End If
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.cboEnvironment) Then
Me.cboEnvironment = Me.cboEnvironment.DefaultValue
End If
End Sub