Share via

Filtering a query with multiple checkboxes

Anonymous
2024-01-06T22:23:37+00:00

Hi,

I have a form with 4 checkboxes. Each of these checkboxes corresponds to the name of a person.

I'd like to use filter a query using these checkboxes.

For example:

If two checkboxes are selected, the table would show only the items relating to those two people.

Any help would be appreciated!!

Paul

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

14 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-07T03:00:33+00:00

    please show your source table and expected result?

    I guess the sql like below:

    select * from source_table where name like 'checkname a' or name like 'checkname b'

    Was this answer helpful?

    0 comments No comments
  2. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2024-01-07T01:00:40+00:00

    You have to use VERY PRECISE language, so we can help you better. That is in addition to Scott's legitimate request: Show us your Relationships diagram with the relevant tables.

    > orders that have been picked by 1 or more pickers.

    That is ambiguous.

    * Can one order be picked by multiple pickers? One line item of an order?

    * I presume EVERY order is picked by one or more pickers, so what are you trying to accomplish?

    Part of being a programmer is being able to declare your intent unambiguously. Please try again. (btw, your database design would answer question 1)

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2024-01-07T00:44:06+00:00

    Well the first question is how the Picker is stored in the Orders table. without that info, we really can't be specific. Also how does an order get multiple pickers? Are Pickers assigned to othe line items in the order?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-01-06T22:51:19+00:00

    I have a table with a list of Orders that have been picked by warehouse pickers.

    I would like to be able filter a query to search for orders that have been picked by 1 or more pickers.

    I have a form with 4 checkboxes for each of these people.

    How would I filter the table based on multiple checkboxes being selected.?

    Was this answer helpful?

    0 comments No comments
  5. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2024-01-06T22:29:17+00:00

    I'm imagining four checkboxes for four lastnames.

    A person typically does not have two names, so how would this work?

    Maybe if one was for Zeta, and one for Jones, you could find Catherine Zeta-Jones :-)

    Can you explain further?

    Was this answer helpful?

    0 comments No comments