?
Solved

Help - DBLookUpComboBox

Posted on 2004-04-23
3
Medium Priority
?
408 Views
Last Modified: 2010-04-16
I have a DBLookUpComboBox for the user to navigate through a DataSet but I didn´t assign a DataSource and a DataField to it because I don´t want it to post anything so I just assigned the ListSource, ListField and KeyField to show. But what I need to do is that when the user opens that form, I need  DBLookUpComboBox to show the first record on the DataSet and it´s showing me Blank.
0
Comment
Question by:fabyola
[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 12

Expert Comment

by:Ivanov_G
ID: 10899190

  1) remove the field value from the dataset

  procedure TForm1.ADOQuery2BeforePost(DataSet: TDataSet);
  begin
    with DBLookupComboBox1 do
      DataSource.DataSet.FieldByName(DataField).Value := null;
  end;

  2) add 2 additional components - DataSource and DataSet (Query, etc) where you are not performing Post operation
0
 

Author Comment

by:fabyola
ID: 10899335
Didn´t work. I want to do it without having to put a DataSet and assigning a DataSource and DataField to my DBLookUpComboBox.
0
 
LVL 17

Accepted Solution

by:
mokule earned 200 total points
ID: 10899566

  Table1.First;
  DBLookupComboBox1.KeyValue := Table1.FieldByName('xxx').Value;
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month7 days, 23 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