Solved

Set Default Value in a DBLookupComboBox

Posted on 2004-04-15
3
3,883 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
calling Tcolordialog in dll make the form disappear 8 113
Open a URL with Internet Explorer in a new tab (not a new window) 1 99
How to debug For loops? 3 50
LAN or WAN ? 11 92
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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