Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Location
    Washington, D.C
    Posts
    29

    Unanswered: Problem with filtering a record set

    Please tell me what i am doing wrong. i am trying to find all records who's case Number = 1222222 and the QI_ID = 1 or 2

    i tried the following to no avail. Try all cause run-time errors

    rstData.Filter = "Case_Number = 1222222 AND (QI_ID = 1 OR QI_ID = 2)"

    rstData.Filter = "(Case_Number = 1222222) AND (QI_ID = 1 OR QI_ID = 2)"

    rstData.Filter = "((Case_Number = 1222222 AND QI_ID = 1) OR QI_ID = 2)"

    HELP

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    If you are using the Filter property of a recordset, you need to put the results of the filter into another recordset by opening the first recordset. Like this:

    Open rstRecordSet1

    Then set the Filter
    rstRecordset1.Filter = Something

    Then open the recordset into another recordset

    set rstRecordSet2 = rstRecordset1.OpenRecordset

  3. #3
    Join Date
    Jun 2004
    Posts
    50
    You should post a general idea of what your tables look like.
    Monk
    The person who confesses ignorance shows it once; the person who conceals it shows it many times.

Posting Permissions

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