Results 1 to 4 of 4

Thread: ADO - Syntax

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148

    Angry ADO -SYNTAX FOR FIND STATEMENT

    Howdy!

    I need the syntax for a find statement with multiple criteria.

    This works with one field, but I need 3 more fields.

    strField = "Hello"
    criteria = "Field1 = '" & strField & "'"

    adoPrimaryRS.Find criteria, , adSearchForward, 1
    If adoPrimaryRS.EOF = True Then Exit Sub

    Thanx.

    [Edited by hyme on 11-16-2000 at 11:06 AM]

  2. #2
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Arrow Hmm...

    Okay, I am not sure of what you are asking, but I'll try.

    The way I have done it is like this:

    Code:
    criteria = "Field 1 = " & field1 & ", Field 2 = " _
    & Field2 & ", Field 3 = " & field3 & ""
    I hope this is what you were looking for.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148
    Yep, That's it.
    Thanx.
    I forgot the comma's

  4. #4
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Cool Your Welcome!

    No problem.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

Posting Permissions

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



Click Here to Expand Forum to Full Width