Combo Search Box and Filters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get my search box to match my filter on my form.

When the form filter is on, i want my search box to be filtered
when my form filter is off, i want my sarch box not to be filtered

Notes:
Combo Box: Combo35
Combo Row Source: SELECT Parse.Ticket, Parse.Account, Parse.[Rec ID] FROM
Parse;
Form Name: [Gopher One]
Form Filter: DoCmd.ApplyFilter "", "([Office Cleared] Is Null) And
([Field Cleared] Is Null) And ([Dispatched] Is Null)"
Combo Code: Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Ticket] = " & Str(Nz(Me![Combo35], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
 
I solved this (make shift) for my own puprposes, but I am sure there is a
cleaner way to do it. What I did was to have two search box's on my form, in
the same position, one visable when the filter is on and one visable when the
filter is off. Each had the appropriate criteria set in their source.
 
Back
Top