Ask Your Question
0

Filtering dropdown boxes in base, Table control [closed]

asked 2019-11-17 13:11:52 +0100

Jon170579 gravatar image

updated 2019-11-17 13:25:09 +0100

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"

C:\fakepath\New base.odb

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Jon170579
close date 2019-11-18 22:58:43.829884

1 Answer

Sort by » oldest newest most voted
0

answered 2019-11-17 21:04:30 +0100

Ratslinger gravatar image

updated 2019-11-18 00:58:13 +0100

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.

edit flag offensive delete link more

Comments

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.

Jon170579 gravatar imageJon170579 ( 2019-11-18 22:58:10 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2019-11-17 13:11:52 +0100

Seen: 129 times

Last updated: Nov 18 '19