Hey All,
I'm trying to filter a from using a few different combo boxes, one of them is to filter records for a date, I'm using the following code but I keep getting the error "Run Time Error 3709. The search key was not found for any record."
Can anyone suggest what I need to do to this code to make it work for my date filter please? I'm guessing that its # or something, however I can never quite get my head around dates, which is a nuisance since most of my system is around dates.
Thank you,
Malcolm
I'm trying to filter a from using a few different combo boxes, one of them is to filter records for a date, I'm using the following code but I keep getting the error "Run Time Error 3709. The search key was not found for any record."
Code:
If Nz(Me.cbxSystemDate, "") <> "" Then
strWhere = strWhere & "[SystemDate] = '" & Trim(Me.cbxSystemDate) & "' AND "
End If
If strWhere <> "" Then
strWhere = Left(strWhere, Len(strWhere) - 5)
Me.Form.Filter = strWhere
Me.Form.FilterOn = True
Else
Me.Form.Filter = ""
Me.Form.FilterOn = False
End If
Can anyone suggest what I need to do to this code to make it work for my date filter please? I'm guessing that its # or something, however I can never quite get my head around dates, which is a nuisance since most of my system is around dates.
Thank you,
Malcolm