Results 1 to 2 of 2

Thread: Listbox Question...........

  1. #1

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Post

    How would I load a column (col) from a database table into my listbox? Thanks

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    Hi,there!
    Here is a code:

    Private Sub Form_Load()
    Dim Db As Database
    Dim Rs As Recordset

    Set Db = OpenDatabase("BIBLIO.MDB")
    Set Rs = Db.OpenRecordset("AUTHORS")
    Rs.MoveFirst
    Do Until Rs.EOF
    List1.AddItem Rs.Fields(1)
    Rs.MoveNext
    Loop

    End Sub

    Good luck.
    Larisa


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