unbound DBLooupComboBox example lazarus / 16-Databases ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-05 18:23 Confession time - I know nothing about TDBLookupComboBox.  Well, not true, I now know more than I knew two days ago :-) What I wanted was:   Allow a DBLookupCombo box to be configured in unbound mode (i.e. no changes made to any table in the database)   Ensure the visible data in the DBLookupCombo is from the selected record in the dataset (i.e. choosing a new value in DBLookupComboBox contents will scroll the dataset to the correct record)   Set the initial displayed value to a previously remembered value. I finally worked out how to do all the above, and I'm happy with the result.  So I added an example to the wiki, along with some of my notes I made along the way.  However, it strikes me that just because my code works for my particular use case (Zeos/MySQL) doesn't guarantee it'll generally work.  http://wiki.lazarus.freepascal.org/dblookupcombobox#Unbound_use Can someone more knowledgable look over the example I added to the wiki and let me know what corrections I need to make?  Ta. Oh, also - there's a section on that page called "Bugs" that makes no sense to me.  Surely you need to set ListField if you want anything displaying?  If anyone can shed light on this, I'll rephrase it so it's clearer to the ignorant (like me :-) ) QuoteBugs At least for DBLookupComboBox, there is a bug with FPC 2.6.0 (used in Lazarus 1.0, 1.0.2 etc) that requires the listfield to be present in the datasource as well.