Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

List of a Combobox

Table1: List for the Combobox
Table2: Table to be updated
How do I get the items/list of a combobox from Table1 so as when TAble1 is updated all the combobox connected to that table will also be updated? The combobox will also be used to update Table2, like when I click an Add button and choose an item from the combobox and then click Update button, the item from the combobox together with other fields will be added as a new record for Table2. Hope somebody could help me ASAP. Thanks.
0
sharol
Asked:
sharol
  • 2
1 Solution
 
kretzschmarCommented:
maybe you need to
use a tdblookupcombobox

0
 
sharolAuthor Commented:
im just new in delphi, please explain further. thanks.
0
 
marcoszorrillaCommented:
As Kretschmar say you must use a TdDlookupCombobox, because this component has a Source and Target.
DataSource:The Table where the field to update is located.
DataField:The field to Update.

ListSource:The Table where the field is located.
ListField:List of fields to show separeted with ;
KeyField:The Field to Update in the source.

Best Regards.
Marcos.
0
 
sharolAuthor Commented:
Thanks also to kretzschmar, you're idea was very good. But it was marcoszorilla who explained it in detail that's why I was able to make it work. thanks a lot.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now