I am trying to figure out how to select a specific client, several clients, or all clients in a query for a report. Any advice is appreciated.
I am trying to figure out how to select a specific client, several clients, or all clients in a query for a report. Any advice is appreciated.
One way is to add a check-box field to your table, something like "Include on Report".
Then, create a Form based on this table, where someone can open it and select which records they would like to see on the Report.
Then, create a query which uses this check-box field as Criteria (only return records where checked), and use this query as the Control Source of your Report.
I was thinking more about an input query. Number of clients is small, less than 10 and all are unique based on their 3 initials entries. This will not change and thus wont require a scale up. What I am interested in is having an input prompt which would allow input of 1 set of three initials or perhaps two sets or a wild card which would include all clients. Thanks.
Well, you can use a Parameter Query that will return one or all of your initials, but I don't know if it is possible to make it work for more than one but less than all.
You would use something like this in your critera of that field in your query:
Like [Enter initials to find or leave blank for all] & "*"
If you are unfamilair with Parameter Queries, you may want to Google it for more details and examples.
Thanks, will look into this.
Well, you can use a Parameter Query that will return one or all of your initials, but I don't know if it is possible to make it work for more than one but less than all.
You would use something like this in your critera of that field in your query:
Like [Enter initials to find or leave blank for all] & "*"
If you are unfamilair with Parameter Queries, you may want to Google it for more details and examples.
Paul,
How's it going?
I was curious as if there was any non-VBA solution (I couldn't think of one, other than the first idea I suggested, but wasn't absolutely sure).
But I think your reply may help confirm that VBA is needed in order to do a multi-select option. Am I assuming correctly?
Hey JoeM, going well; you?
To the best of my knowledge, a multi-select listbox solution would require VBA. The check box field would work without, but in my mind is harder to work with for the user.
Things are going well here, Paul.
I was just hoping to see if I could find a non-VBA solution for the user (I know users are sometimes prevented from using VBA), and wanted to make sure I wasn't missing anything obvious (it has been known to happen from time-to-time!). Thanks for confirming that it would require VBA, and I haven't overlooked anything.
As suggested above, the following
Like [Enter initials to find or leave blank for all] & "*"
worked for one or all only, not multiple. However, it should be adequate for the project in hand. VBA would be beyond the scope of the project. Thank you all.