Libreoffice base - subform ignores sql command

I have text boxes that update a filter table that I am trying to link to a subform. If I link the filter table master fields to the subform table slave fields, then the subform will display records only where all of the slave fields match the master fields, regardless of the SQL command. For example, I have tried:

SELECT ID FROM Table, FilterTable WHERE Field1 = Field1Filter OR Field2 = Field2Filter
SELECT ID FROM Table, FilterTable WHERE Field1 LIKE ‘%’||“Field1Filter”||’%’

But it still behaves as if it says that all fields must match the filter fields. Removing the link between master and slave fields and just simply doing the SQL command doesn’t work either. I am very confused as to how this works and how to make the subform actually display what is written in the SQL command. I am using Libreoffice Base version on MacOS with HSQLDB embedded.


When performing table filtering there is no master/slave link. There is actually no need for a sub form either. Another main form can work but a sub form is sufficient. The select information is generated based upon the SQL utilizing both the table with the data and the filter table table. Your SQL only has one table name listed.

Once you have entered the data in the text boxes (connected to filter table), a refresh button (on sub form or second main form) is pressed to rerun the SQL. This then retrieves the requested data based upon the filtering.

For a sample which uses a single text box and the LIKE filtering, see this post → How to create a wildcard search form (with Base/FireBird)?. Being a Firebird embedded database should make no difference.

If you continue to have difficulties, it would help to get a sample (scrubbed) of your Base file.