Filtering dropdown boxes in base, Table control

Mac OS Catalina 10.15.1
Libreoffice 6.2.8.2

I am creating a database to record visits to pubs, Pub info, Date, Time of receipt etc. I also have a table at the bottom that will record who had what and it broken down into Name, Category, Sub Category, Product, Volume and price.

Name. Category. Sub Category. Product. Vol. Price

The name is easy I have just done a list box linked to a table with the names in.

However in regards to the Category, Sub Category, Product & Vol. I want these to filter down so that I am not having to scroll through loads products.

I am using list boxes for all the below too.

For instance when Alcohol is selected in “Category” only the “Lager” and “Wine” would show up in in Sub category, then equally only “Carling” & “Fosters” will show up in product. and for each of them only half or pint will show up in vol

As it stands because I cannot get the filters to work I am getting a list of every sub category, product and lost of Vol even duplicated vols as I have entered Half and pint for 2 lagers it appears twice.

I have linked all the tables with 1-many relations ships and created an input form to enter the the different prouducts.I have attached the database.

The form I am trying to do this in is, “List Box Datasheet”

New base.odb

Hello,

Progressive list boxes are fairly simple when dealing with filtering records on a form. This can be done with list boxes, push buttons and a table filter without using any macros.

However, when dealing with this in a single record for data entry, macros are the only method to get this done. To further complicate the issue, it is a different process when dealing with individual controls than it is when dealing with a table control. You have both in your samples.

In my answer in this post → How to use user selected value from combobox1 in combobox2 ‘SELECT’ statement. are samples of each method.

  • Sample - Dogsjohnh009.odb deals with a table control

  • Sample #2 - ProgressiveListboxes.odb deals with individual controls

Each sample is only one list box based upon the selection in another. Your example has more than this and requires more in the way of code.

Thank you so much for this, I have managed to use and edit the code to work with my data sheet. I then used the same macro and edited for each of the following fields.