Need to Filter a table with two fields for key words

Hello. I have one table that needs filtering. It contains only two fields: Name, and Description. The goal is to show all results that contain any part of the Description. I have the table and a form. I started to create a query but I don’t know how to get the data to be searched for from the user.

Example:
Table: Books
Fields: Name, Description

User types in “horror” and all books that contain “horror” in the description is listed in a table or a report. I don’t know where the user would type in what they’re wanting filtered, to start. I am completely new to this. I’ve read documents and looked at videos, but they seem to require more experience than I have. Any help is appreciated. Thank you.

I’m using LibreOffice 6.

1 Like

Hello,

First it should be mentioned that your table should include a unique key field apart from what you have. This is easily included as an auto-increment Integer type field (maybe as ‘ID’ or ‘BookID’).

What you need is to use table filtering. As opposed to a discussion here, please see this post → Filter/Search with Forms (leveraging SubForms) for a detailed explanation.

Along with a filter table comes the needed SQL. The statement needed would include LIKE in the selection criteria. This would give you the ability to find ‘horror’ anywhere in the Description field.

Have attached a sample depicting all of the above.

Sample: BookSearch.odb

If this answers your question please tick the :heavy_check_mark: (upper left area of answer). It helps others to know there was an accepted answer.

You sure did answer my question, thank you! I had used the auto increment thing on the table from the wizard. Thank you again, I did not know about table filtering.