?
Solved

Set Default Value in a DBLookupComboBox

Posted on 2004-04-15
3
Medium Priority
?
4,172 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
[X]
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
3 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 150 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

Technology Partners: 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!

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…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

765 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