Ask Your Question
0

How to set up correctly a search dropdown button?

asked 2018-09-07 11:53:10 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello everyone! I hope you can help me. I have a databade on MSAccess, that I'm tansferring to LOBase. I'm new to LibreOffice, and I'm following some tutorials + the old DB was built from another person.

The database contains the datas of many many people, as I work for an association. In the old database there is a very useful dropdown button, sorted by last name, that helps me find a person quickly.

It's all on the same form. (image 1) search button old DB

When I start to digit, all the names appears (image 2) search typing on old DB

and when I click the selected one, all the data appear on the form below (see image 3) search result on old DB

The last image is the result of my work up to now...! [new L.O.Base] new DB on L.O.Base

My question is: how do I set up correctly that dropdown button?

I followed the tutorials, tried to set up query, but nothing is coming right... :-(

I hope anybody can help! Thank you from Italy, Roby

edit retag flag offensive close merge delete

Comments

@Roby When asking a question, please do not check ask as wiki checkbox - this helps no one.

Ratslinger gravatar imageRatslinger ( 2018-09-07 16:41:57 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-09-07 17:04:28 +0100

Ratslinger gravatar image

Hello @Roby,

It is difficult to establish just where your current problem is. The original form you present is most likely using a macro to retrieve the data since once a selection is made the data appears.

Regardless of using a macro to retrieve the record or using a push button, the process is known as filtering. Without a macro, the list box is created from entries in an existing table (retrieved by SQL) and the selected item is saved in a "Filter" table. This is like a temporary storage area. You then use a push button to refresh the sub form (where the persons data is displayed). The sub form is obtained by using a Query which selects the appropriate record based upon the selected item in the "Filter" table. Much more on how all this works and how to set up can be found in this post -> Filter/Search with Forms (leveraging SubForms).

Now doing this in a macro works in a similar fashion but operates without a "Filter" table or external query. It also retrieves the record without the need of a push button. However, writing macros, especially for someone new to Base, is a step learning curve.

Many examples using each of the above methods are posted through out this forum. Here is a post containing links to a number of samples -> how to put a search box into a LO Base form

Finally, images (as in your question) typically do not explain where the problem may reside. It is always better to post a sample DB WITHOUT personal or confidential information.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-09-07 11:53:10 +0100

Seen: 146 times

Last updated: Sep 07 '18