Results 1 to 2 of 2

Thread: More then 1 output

  1. #1

    Thread Starter
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180

    More then 1 output

    Sorry guys, I'm completely new to databases so maybe this is a very stupid question, but we'll see that later.

    I have a database with a lot of customer data and I want to do this search on it:
    VB Code:
    1. Set RS = DB.OpenRecordset("SELECT * FROM Customer WHERE UserName = 'Smith'", dbOpenDynaset)
    This gives me multiple records since there are more then 1 Smiths in my db. How do I get all these records. 'cause if I now do this:

    VB Code:
    1. With RS
    2. blablabal

    I only get the first record.

    What do I need to do to get all the records and put there names say in a listbox?

    tnx very much !

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    guess u'r looking for something like this

    VB Code:
    1. While Not RS.EOF
    2.    List1.AddItem RS("FieldName")
    3.    RS.MoveNext
    4. Wend
    -= a peet post =-

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