Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    filter within filter (Access 2000)

    I find the record on a form with the help of a combo box
    as follows:
    ' Find the record that matches the control.
    Me.RecordsetClone.FindFirst "[CustomerID] = " & Me![Combo47]
    Me.Bookmark = Me.RecordsetClone.Bookmark


    Also, i have an Option box that filters the records within a given
    conditionlike that

    Private Sub FilterOptions_AfterUpdate()


    ' Apply or remove the filter for the option the user chose.

    Select Case Me![FilterOptions]
    Case 2 ' Berlin
    Me.Filter = "afid = 1 "
    Me.FilterOn = True ' Apply the filter.
    Case 3 ' Paris
    Me.Filter = "afid = 2 "
    Me.FilterOn = True ' Apply the filter.
    Case 4 ' London
    Me.Filter = "afid = 3 "
    Me.FilterOn = True ' Apply the filter.
    etc
    etc

    ALl that works well.However i want to refine my form and allow searching for a record within the filterred records.And i cannot do it.
    For example, if i choose option Number 2, Berlin, i can see in the combo box only those records correspond to afid = 1, however i

    cannot firnd the record i want,the combo box just doesnt work.
    Can sombeody help me ?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: filter within filter (Access 2000)

    Is the problem that you have selected only those where afid = 1, and the record you want does not have afid = 1. If this is the case, then clear the filter and try the combobox now. I think this is your problem.

    Pat

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: filter within filter (Access 2000)

    You can't use the same combobox to apply an additional filter using the code you posted, so what exactly is it that you're trying to do? Do you want to search for particular records where afid = 1 or are you trying to do something like searching for records where afid = 1 OR afid = 2, or what?
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •