Results 1 to 2 of 2

Thread: VB6 and Access HELP !

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Decatur, AL US
    Posts
    14

    Post

    I'm trying to search an Access database and populate a DBcombo with a certain data ...

    In the database I have student Id's and Courses they have taken ... I'm trying to search using the StudentID and then populate a DBcombo box with all the courses they have taken ...

    I have the search working and I can send the first line of data to a text box, but I'm not sure how to send all of the data to a DBcombo.

    ANY SUGGESTIONS???????

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Posts
    82

    Post

    If you are using a datasource, then set the DataMember, DataSource, RowSource, and ListField Properties of the DBCombo.

    If you are accessing you database through code: ie Dim x as databaseobject then you could use a regular combo box and then using a while loop, use additem method to add the courses to the combo box:

    while not recordsetobject.eof
    combo1.additem recordsetobject!fieldname
    recordsetobject.movenext
    loop

    HTH

    Preeti

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