Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Delphi7 - Populating List Box From DB

  • 20-02-2008 10:54AM
    #1
    Closed Accounts Posts: 5,240 ✭✭✭


    I have a DBLookUpListBox which i want to populate with data from a field in a database. The field is in the 'Event' Table, field name is 'EventType'.

    Under the ListBox propertys i have set my dataSource to the query and then set the DataField to EventType. How do i get the list box to populate now? I would have thought once those two propertys are set it would populate automatically. Guessing im missing some line : LookUpBox.populate or something?
    Am new to delphi so any help would be appreciated :].

    Endo


Comments

  • Registered Users, Registered Users 2 Posts: 2,157 ✭✭✭dazberry


    You also need to set the ListSource property to point to your "lookup" datasource, and set the KeyField and ListField properties as appropriate.

    D.


  • Closed Accounts Posts: 5,240 ✭✭✭Endurance Man


    Thanks dazberry, that worked.


Advertisement