View Full Version : Dblookupcombobox
I take datas from access and put them ưn to an dblookupcombobox when i run my application my dblookupcombobox first field is always empty i want when my application run dblookupcombobox shows the first row?
how can i do it
06-14-2001, 12:13 PM
procedure OnFormActivate(Sender: TObject);
dbListCombo.ItemIndex := 0;
Hope this will help.
06-15-2001, 10:02 PM
for a dblookupcombobox to work properly, you must set its listsource, listfield, keyfield correctly, "look up" means that the this field's value is not arbitrary, it should be found somewhere else: for example, you have a table order which has a field custno, you know for sure each order must be from one of the customers that in another table customer, so in this case, you can setup your dblookupcombobox like this: datasource := datasourceOrder; field := CustNo; ListSource := CustomerSource; listField := CustName; KeyField := Custno;
you can now choose from customer names when making an order! it's much better that type customer No.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.