Solved

Set Default Value in a DBLookupComboBox

Posted on 2004-04-15
3
3,923 Views
Last Modified: 2007-12-19
I'm using a stock version of Delphi 7 and would like to display default values in combo boxes.

I've got DBLookupComboBoxes hooked up to a database source (grabbing values from a lookup table) and working properly; however, I would like to (upon creating a new record) automatically load a default value in the combo box (so as to save the user time by not *having* to select a value if none exists (or isn't applicable), for example).

As it stands right now, a user must manually select values for each combo box upon the creation of a new record...which can be a time-consuming practice (especially if the user selects the value (N/A or none)).

Any help on this would be appreciated.  Thanks!
0
Comment
Question by:zaskem
3 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 50 total points
ID: 10837751

Hi

After creation new record You should set default values for fields which are DataFields in DBLookupComboBoxes
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10839965

   .KeyValue of LookupDataSet
0
 

Author Comment

by:zaskem
ID: 10843423
mokule,

Thanks for the insight.  That has corrected the problem and it's working as anticipated.

Ivanov_G, I will also be looking further into your suggestion for another option elsewhere in the program.

Thanks again!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

809 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