Hi guys
I have a set of combo filters that filter one after the other as follows –
and so on to filter down so the user can work with what they filter, my question is how can I add on a filter that filters between dates? and second I was hoping that I could program the filters so that they could be changed individually/randomly as to filtering one after the other and then clearing to restart the filtering again if that makes sense.
I have tried using this, but it doesn’t work ‘Bad Command’
And
Cheers guys!
I have a set of combo filters that filter one after the other as follows –
Code:
Private Sub cboCity_AfterUpdate()
If Nz(Me.cboCity.Text) = "" Then
Me.Form.Filter = ""
Me.FilterOn = False
ElseIf Me.cboCity.ListIndex <> -1 Then
Me.Form.Filter = Me.Form.Filter & " and [City] = '" & _
Replace(Me.cboCity.Text, "'", "''") & "'"
Me.FilterOn = True
Else
Me.Form.Filter = Me.Form.Filter & " and [City] = '" & _
Replace(Me.cboCity.Text, "'", "''") & "'"
Me.FilterOn = True
End If
Me.cboCity.SetFocus
Me.cboCity.SelStart = Len(Me.cboCity.Text)
End Sub
I have tried using this, but it doesn’t work ‘Bad Command’
Code:
Me.Form.Filter=”StartDate =#” & Format(Me.txtStartDate, “mm/dd/yyyy”) & “#”
Code:
Me.Form.Filter=”EndDate =#” & Format(Me.txtEndDate, “mm/dd/yyyy”) & “#”
Cheers guys!

Last edited by a moderator: