Another really common Access question goes like this:
- How do I use a multi-select list box to filter my report?
- or How do I let my user select multiple items and then open a form or report showing those items?
List boxes allowing multiple selections are a pretty natural user interface. Think "print a report for three different departments" or "include these four employees in the sales graph". Creating and using criteria for your form or report with a multi-select list box is a lot different than a combo box or single select list box, but it's not hard at all once you've seen it in action and done it a couple of times.
I've done a little searching and I think these are the three best links on the topic:
- Allen Browne's "Use a multi-select list box to filter a report". This is probably the most often cited reference on the subject. Good code with explanations.
- Microsoft's "How to Use a Multi-Select List Box to Filter a Form". Two different approaches focused on filtering a form. Either would work with reports too. Their first method is the same as Allen's approach. Their explanation seems a little lighter than Allen's, for instance Allen tells you what to do if your key field is not text, where Microsoft leaves that for you to work out.
- Multi-Select Listbox Functions from "My Access Tips". This one is notable in that it has a downloadable sample database.
No comments:
Post a Comment