Ask Your Question
0

Need to Filter a table with two fields for key words

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

sintrigue 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.

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

Ratslinger gravatar image

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

edit flag offensive delete link more

Comments

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 243 times

Last updated: May 01 '18