Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Use Combo box like MS Access 2000

Posted on 2002-05-24
3
273 Views
Last Modified: 2010-04-04
I am trying to convert from MS Access 2000 and am running into a small problem with the combo boxes in Delphi.  In access if I have an employee maintenance form and on that form is a status field that has a combo box filled with (Active, Inactive, ect.) it is set up by telling the combo box where to get it's list and the column properties and then telling it what data field on the form to be bound to.

However, I haven't found out how to duplicate this behaviour in Delphi yet.  I can get the combo box to bind to the status field correctly, but how do I get it to populate with the valid options (They are in a table) and how do I get it to display multiple columns?
0
Comment
Question by:header
  • 2
3 Comments
 
LVL 2

Expert Comment

by:freshman3k
ID: 7033341
Hello!

Use a DBLookupComboBox(included with delphi). ListSource property is data source and set ListField and KeyField to the field you want to display in drop down.

or you can look on this website,they have alot of free DBLookupComboBox's with different features,Just in case the DBLookupComboBox included with delphi dosent have enough features that you want:

http://www.torry.net/db_lbcb.htm

Good Luck :-)
0
 
LVL 2

Accepted Solution

by:
freshman3k earned 100 total points
ID: 7033491
Hello!

Use a DBLookupComboBox(included with delphi). ListSource property is data source and set ListField and KeyField to the field you want to display in drop down.

or you can look on this website,they have alot of free DBLookupComboBox's with different features,Just in case the DBLookupComboBox included with delphi dosent have enough features that you want:

http://www.torry.net/db_lbcb.htm

Good Luck :-)
0
 
LVL 2

Author Comment

by:header
ID: 7220364
Sorry, I forgot about this question.

Thanks!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question