Results 1 to 3 of 3

Thread: list boxes

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Unhappy

    Im a trainee programmer and have been given a V.B database project. The only problem is that I don't know how to link listboxes to databases!! Please help me so that I can get a job!!!
    Gilly

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696

    Cool

    Hi gilly

    There are two ways you can get a list box to connect to a database.

    One.

    You can make a ADO/DAO data control and bind the list box to it using the datamember and datasource properties of the list box.

    Two.

    you can create a recordset at runtime and populate it throught code.

    Mylistbox.Clear
    While Not Myrecordset.EOF
    Mylistbox.AddItem Myrecordset("MyField")
    Wend

    Either way you get the same affect

    Hope this helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Cool list boxes

    Thank-you for your help. My chances of employment are not looking so bleak now!!!!!!
    Gilly

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