Problem using DBLookupComboBox lazarus / 16-Databases ---------------------------------------------------------------------- JanRoza · 2009-06-19 13:58 I'm having a problem using a DbLookupComboBox and I'm not sure if this is a bug or if I'm doing something wrong (I presume the second). I have a SQLite database and two tables (tblInventory) and (tblValuta) which both have a field named Valuta ans two datasources pointing to those tables (dsInventory and dsValuta). On a form I placed a DBLookupComboBox which has dsInventory as its datasource (datafield Valuta) and dsValuta as its Listsource (listfield Valuta). I've specified Valuta as Keyfield. In the formCreate both tables are opened and set active. Everytime I open this form in my application I get an error message 'tblValuta: Field not found: "Valuta"'. I'm at a loss here as field Valuta most definitely exsists in both tables, so why this error? I'm sure it must be me misunderstanding something of this DBLookupComboBox but I can't find out what. Testing is done with Lazarus 0.9.27 Fpc 2.2.4 and SQLite 3.6.15. Any help and suggestions are welcome!  Jan ---------------------------------------------------------------------- JanRoza · 2009-06-22 20:11 Does no one has any solutions or hints on this matter? ---------------------------------------------------------------------- Loesje · 2009-06-23 21:42 Can you upload a small workable example somewhere? ---------------------------------------------------------------------- JanRoza · 2009-06-25 06:56 Will try to make an example and place it here this weekend. Thanks! ---------------------------------------------------------------------- JanRoza · 2009-06-27 21:40 I've zipped my project and the SQLite database so you should be able see what I mean. Just double-click on the only entry in the grid of the main screen and you'll get the error message instead of the detailform. http://home.hccnet.nl/j.roza/j.roza/Silentwings/software/MyDatabases.z ip As you can see in the SQLite database there is a table Valuta and it does have a field named Valuta as does the Inventaris table. Hope you see where I go wrong because I'm starring myself blind on it but don't see it. ---------------------------------------------------------------------- Loesje · 2009-07-14 20:02 That's not a simple example, that's a complete program. And it works, for me. Maybe you just need to use a newer version of fpc/lazarus. Andyou have the keyfield set to valuta, shoudn't that be id? But I haven't looked into your table-design. And I do get an error-message when I select a different value for valuta, but that's probably something else...