How to filter a table used in a form and remain editable

Hello, I am using mysql server 8.0.28 64bit, libroffice base 7.3.0.3 64bit and win 10 64bit.
I have used the filter options in the form properties to filter a table and the table remains editable, which is what I want. If I use a query to filter the table for the form the the table(or query) is not editable. I have gone through the frugal computer guy tutorials with regard to searching in a form and I seen how it is similar to a filter except it does not demonstrate using OR with regard to a column value, it only shows using AND between different columns. The table holds company information with a column named type. This column holds 1 of 3 possible values: customer, vendor or both. I can easily filter the table using the filter options in the form properties to contain customer or both and create a separate form with vendor or both. Is there another way to produce the same thing without using the filter options in the form properties? Just really curious. Thank you in advance.

Woops! Sorry. I just tried the sql command in the data section in the form properties and the form seems to be editable. I am guessing this is the same as the filter option directly underneath it. It seems to be editable this time. Sorry for the confusion but if anyone knows I would still appreciate the knowledge.

For getting editable queries:

  • Query must contain all primary keys of the tables, which appear in the “FROM” part of the query.

  • If you are using an alias for a table in the query it will work only with this one table.

If you use MySQL the query editor will often create an alias for every table automatically. Switch to the SQL-view and change it and the query will be ready for input data if all primary keys are part of the query.

Thank you Robert. I was aware of the all primary keys of the table requirement. I did see in sql view the alias that was created. At the same time I had also pressed the ‘run sql command directly’ button. With this button pressed the issue was not resolved. But once I deactivated the same button the query was editable. Thank you very much! I look forward to picking your brain in the near future.