Solved

Set Default Value in a DBLookupComboBox

Posted on 2004-04-15
3
3,761 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
Comment Utility

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
Comment Utility

   .KeyValue of LookupDataSet
0
 

Author Comment

by:zaskem
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now