Hi
Can I use the below method to filter dates from and to, I have comboboxes that filter one after the other using the afterupdate even??
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
Can I use the below method to filter dates from and to, I have comboboxes that filter one after the other using the afterupdate even??
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