Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Delphi7 - Populating List Box From DB

Options
  • 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 Posts: 2,145 ✭✭✭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