Hi
Please could sombody help me with these 2 related queries:
1. I have a form which can be filtered by Name and Date using two combo boxes, the Date combo box filters based on the selection of the Name combo box. This is fine apart from if I just want to filter by date, in which case it won't let me. Please could someone let me know how to get these two combo box filters working both independently as well as together. See code below that I am using so they work together:
2. This is a strange one - for some reason although my date filter works fine for some dates, it doesn't seem to work for others e.g. my date range is currently from 01/11/2014 - 30/11/2014. The filter works when I select 11/11/2014 or above but doesn't work for earlier dates in the range even though those dates are present in my table. Would anybody know why this would be and be able to help me?
Many thanks
Please could sombody help me with these 2 related queries:
1. I have a form which can be filtered by Name and Date using two combo boxes, the Date combo box filters based on the selection of the Name combo box. This is fine apart from if I just want to filter by date, in which case it won't let me. Please could someone let me know how to get these two combo box filters working both independently as well as together. See code below that I am using so they work together:
Code:
Private Sub Combo95_AfterUpdate()
If IsNull(Me.Combo95) Then
'Remove the filter
Me.Filter = vbNullString
Me.FilterOn = False
Else
Me.Filter = "[PO Type Name] = '" & Me.Combo87 & "' AND [Booking Date] = #" & Me.Combo95 & "#"
Me.FilterOn = True
End If
End Sub
2. This is a strange one - for some reason although my date filter works fine for some dates, it doesn't seem to work for others e.g. my date range is currently from 01/11/2014 - 30/11/2014. The filter works when I select 11/11/2014 or above but doesn't work for earlier dates in the range even though those dates are present in my table. Would anybody know why this would be and be able to help me?
Many thanks