DBLookUpCombobox Duvida - Delphi 6

0

Good morning.

I'm using Delphi 6 and am having a question, I have a table of students bound to a table of disciplines, and these disciplines are displayed within a DBLookUpCombobox, except that when I select a particular student, I would like discipline that it is linked already appeared in the box of this Combobox, without needing this box because it does not appear first, only when it clicks and shows the list of disciplines.

Att.,

Gustavo.

    
asked by anonymous 08.06.2017 / 17:02

1 answer

0

For this you need to configure the DBLookUpComboBox correctly:

  • ListSource = > The DataSource that provides the data in the "Disciplines" table

  • ListField = > The field in the "Disciplines" table that shows the name of the course.

  • KeyField = > The Primary Key field of the "Disciplines" table.

If you want to modify the Discipline field in the "Students" table, you must also configure:

  • DataSource = > The DataSource that will receive the data, in this case the "Students".
  • DataField = > The Foreign Key field that will receive the KeyField value.
10.06.2017 / 06:24