How to Search for record using a List box

macOS Catalina
Libre Office 6.2.8.2

I have a form “ztbl_Pub_Info2” which is linked to a table with over 900 entries. On this form I want to be able to use the Listbox “List Box 1” to select the record.

I have set the listbox up to show Pub Name and Post Code so that I have a unique value to select. When I select a pub I want all the other fields to show the information for that record or goto the record I have selected.

Eventually I will have sub forms to record each visit and purchase I make at each of the pubs.

Sorry edited as I had uploaded the wrong file

J.D. Wetherspoons.odb

Hello,

What is wanted here is table filtering. For a complete explanation on how this works see this post → Filter/Search with Forms (leveraging SubForms)

Have modified your sample to include this function. Copied your form and modified it as zbt_Pub_Info2_Filtered. The list box is now the main form and MainForm has become a subform. The combo box was changed to a list box and a push button was added to refresh the data on the sub form once an item is selected in the list box. The selected id from the list box (added to the SQL) is stored in the newly created pub_filter_able. The sub form is filtered by linking to this selection.

Sample ----- Pubs.odb

Please note, there is no need to Close a question. It is preferred to rather click on the :heavy_check_mark: (upper left area of answer) if your question has been answered.

Just saw your correction after posting my answer. Concept will be the same no matter the file.

Thank you so much, I can’t believe how simple it was