I am using a spilt view form and I am apply two different criteria to the data, one is based on a date range and the other is items selected in a multi select list box.
When I separate each critera and run them separte they work, and when I put them together it actually works but just does not apply the filter. In order to actually apply the filter I have to select one of the drop down boxes (Where I see what I wanted filtered) then click ok and it filters correctly. So bascially my filter criteria that I input is in the drop down check boxes properly checked, it just doesn't automatically update.
Below is my code, please help.
Private Sub Command90_Click()
Dim Criteria As String
Dim i As Variant
' Build criteria string from selected items in list box.
Criteria = ""
For Each i In Me![List85].ItemsSelected
If Criteria <> "" Then
Criteria = Criteria & " OR "
End If
Criteria = Criteria & "[Line]='" _
& Me![List85].ItemData(i) & "'"
Next i
' Filter the form using selected items in the list box.
Me.Filter = "[Date Production] Between " & CLng([Forms]![Start Screen]![StartDate]) & " And " & CLng([Forms]![Start Screen]![EndDate]) & " And " & Criteria
Me.FilterOn = True
End Sub