Ask Your Question

Need to Filter a table with two fields for key words [closed]

asked 2018-05-01 18:21:37 +0200

sintrigue gravatar image

updated 2021-05-07 09:48:43 +0200

Alex Kemp gravatar image

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.

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2021-05-07 09:48:56.171319

1 Answer

Sort by » oldest newest most voted

answered 2018-05-01 19:00:45 +0200

Ratslinger gravatar image


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 ✔ (upper left area of answer). It helps others to know there was an accepted answer.

edit flag offensive delete link more


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.

sintrigue gravatar imagesintrigue ( 2018-05-01 19:16:22 +0200 )edit

Question Tools

1 follower


Asked: 2018-05-01 18:21:37 +0200

Seen: 833 times

Last updated: May 01 '18