(SOLVED) Index Based on Unknown field error (TDBf) lazarus / 16-Databases ---------------------------------------------------------------------- bill0287 · 2013-12-03 05:20 I am using an existing dbf file from an old Delphi app. I am trying to filter the TDbf data using something like this: Code: [Select]  If DBLookupComboBox1.Text <> '' then           // this is looking in a field called REGNAME    with ReportDBf do begin       Filter := DBLookupcomboBox1.Text;                       //I want to filter the table on all rows matching the REGNAME selected above       Filtered := True;       end; When I run this I get the following error: Index based on unknown field "" I have tried looking at the tdbf tutorial and some other example but still don't understand how to set up the Filter option correctly to do this. Any suggestions? UPDATE: This code seems to be working: Code: [Select]  If DBLookupComboBox1.Text <> '' then     with ReportDBf do begin       Filter := 'REGNAME=' + QuotedStr(DBLookupcomboBox1.Text);       Filtered := True;       end; ---------------------------------------------------------------------- LacaK · 2013-12-03 06:09 What is in DBLookupcomboBox1.Text ? ---------------------------------------------------------------------- bill0287 · 2013-12-03 06:17 It's the data from the field REGNAME from ReportDBF. So for example, the DBlookupcombox1 has the value = Bob The error message reads: Index based on unknown field "Bob". I know I must not be setting the filter property correctly, but the examples aren't helping me.