fabyola
asked on
Help - DBLookUpComboBox
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.
ASKER
Didn´t work. I want to do it without having to put a DataSet and assigning a DataSource and DataField to my DBLookUpComboBox.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1) remove the field value from the dataset
procedure TForm1.ADOQuery2BeforePost
begin
with DBLookupComboBox1 do
DataSource.DataSet.FieldBy
end;
2) add 2 additional components - DataSource and DataSet (Query, etc) where you are not performing Post operation