Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    145

    Unanswered: recordset.find criteria

    I am using the recordset.find method and it works for one parameter, but I need to search by two now. What is the format for searching for 2 parameters using recordset.find?

    I have:
    aID = 1
    tID = 2

    rst.find "ID = " & aID 'This works fine

    I need find a record that has ID = aID and ID2 = tID, just an example. How do I format this for the find method? I've tried:

    rst.find "ID = 1, ID2 = 2"
    rst.find "ID = 1 AND ID2 = 2"

    and a bunch of variations. Thanks for the help.

  2. #2
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    rst.find "ID = " & aID & " and ID2 = " & tID

  3. #3
    Join Date
    Jan 2004
    Posts
    145
    I am using an adodb.recordset. It's find method can only have one parameter. I have to use the filter propery if I have more than one field in the criteria.

  4. #4
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440

Posting Permissions

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