mardi 11 janvier 2022

Microsoft Access - Filtering a form based on check boxes for one field

I have a form with a list of farmers and all of the livestock they own (if a farmer has multiple types of livestock, they are listed in separate records). What I want to do is allow the user to filter the form so they can see only the farmers that have certain types of livestock, depending on what they check. There is a button the user clicks on to run the filter. I know this can be done, but I can't figure out how.

For example:

Bob has Livestock A

Bob has Livestock B

Sally has Livestock A

Sally has Livestock C

Jimmy has Livestock C

Jimmy has Livestock D

If the user clicks on the checkbox for Livestock A and then clicks on the 'Filter' button, only Bob and Sally's information would appear. If the user clicks on checkboxes for Livestock A and C, all of the above farmers would appear.

I have a table that lists all of the types of livestock called lstLivestockTypes and a query that lists all of the farmers and the type of livestock they own called qryPlansLivestockOperator (Operator is the farmer). The form displays the query's data (continuous).

I'll keep researching solutions, but if anyone can help, it would be greatly appreciated!




Aucun commentaire:

Enregistrer un commentaire