I have a form that I would like to have a combo box that I can do searches for the order date. Below is the code I am using for the AfterUpdate combo.
Private Sub cboWholesaleDateSearch_AfterUpdate()
If IsNull(cboWholesaleDateSearch) Then
Me.FilterOn = False
Else
Me.Filter = "[WhlSleOrderID]=" & cboWholesaleDateSearch & ""
Me.FilterOn = True
End If
End Sub
When I enter or select the date in the search box I receive the message "The value you entered isn't valid for this field." I have the Format options set to Medium Date for both the search box and the text box in the main form. I am using the same code for several other search boxes on another form, however they are not searching for dates, but they work fine. Thank you.