Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing text in DBLookupComboBox

Status
Not open for further replies.

Delphard

Programmer
Jul 22, 2004
144
RS
How can I "enforce" DBLookupComboBox to show text from ListSource/ListField immediately after Form is show, without explicitly choosing with click?
 
The DBLookUpComboBox component has a procedure called DropDown. You can place the DBLookUpComboBox1.DropDown in the OnShow Event of the From.

Regards
 
Thanks kimowaugh, but this is not enough. DropDown procedure just drop DBLookupComboBox, but I still must click an item to make selection select. I want this be automaticali (to show actual ListField from ListSource).
 
on the form on create add this line

DBLookupComboBox1.KeyValue:=DBLookupComboBox1.ListSource.DataSet.FieldByName(DBLookupComboBox1.KeyField).value;

where DBLookupComboBox1 is your dblookuopcombox box name

it should work...
jb
 
Well done, jbpelletier !!!!
Keep going!
Regards!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top