Searching a Recordset

Results 1 to 2 of 2

Thread: Searching a Recordset

  1. #1
    Conn Guest

    Default Searching a Recordset

    Hi, I want to do multiple searchs on a recordset<BR>is there a filter or seek method that i can use?<BR><BR>If not any ideas?

  2. #2
    Join Date
    Dec 1969
    Posts
    105

    Default RE: Searching a Recordset

    More info required.<BR><BR>As far as my understanding goes you generate a query and then the result of this is stored in a recordset and you can grab data from the recordset anytime you want.<BR><BR>Do you mean that you have many conditions and you only want to use one recordset. If so then:<BR><BR>SQL = "SELECT field from table "<BR><BR>If condition is this then<BR> SQL = SQL & "WHERE ID = " & ID<BR>ElseIf condition is that then<BR> SQL = SQL & "WHERE ID = " & Number<BR>Else<BR> SQL = SQL & "WHERE Name = &#039" & Name & "&#039<BR>End If<BR><BR>recordser.Open SQL, connection, ........<BR><BR>Hope this is what you mean as you didn&#039t really supply enough info

Posting Permissions

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