Results 1 to 2 of 2

Thread: How do I get a dblistbox to link to my...

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245

    Post

    How do I get my dbListBox to link into my db. I actually know how to link it but I am a little confused about how to make it show Titles from my db. And once a Title is chosen from the list my other textboxes need to show their related information.

    For example say my dbListbox is for Titles of books. All other textboxes show the author, editors, price, etc. All I need to know is how to make the db display all Titles in my db, so once a Title is chosen the other text boxes should show the authors, editors, prices and etc pertaining to the chozen Title.

    I hope that made sense.
    I sure could use some help, thanks,
    Daniel Christie

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    1. Put a data control on the form.
    2. Link the data control to the database in the normal way (via properties or code)
    3. Put the DBListbox on the form, set it's DataSource property to the data control.
    4. Set it's ListField property to the field you want to display in the listbox.
    5. If you want to be able to return an unique id, not just the title from the listbox, then set the BoundColumn to the field name of the id field.
    Then, in your code you can check DBListbox1.BoundText for the unique ID of the currently selected record, or DBListbox1.Text for the title of the currently selected record.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



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