Results 1 to 10 of 10
  1. #1
    IzzyKap is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    10

    Specify a specific client, several clients or all clients


    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.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    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.

  3. #3
    IzzyKap is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    10
    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.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    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.

  5. #5
    IzzyKap is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    10
    Thanks, will look into this.

    Quote Originally Posted by JoeM View Post
    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.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    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?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    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.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    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.

  10. #10
    IzzyKap is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    10
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Limit clients to forms?
    By bgarey in forum SharePoint
    Replies: 0
    Last Post: 12-07-2011, 10:25 AM
  2. Replies: 1
    Last Post: 09-02-2011, 07:12 AM
  3. My form will not display all clients?????
    By Bautcalle in forum Forms
    Replies: 2
    Last Post: 08-31-2011, 11:35 AM
  4. Query to seperate active/inactive clients
    By csnyder1582 in forum Queries
    Replies: 5
    Last Post: 05-05-2011, 12:01 PM
  5. Sum By Clients
    By BorisGomel in forum Programming
    Replies: 2
    Last Post: 05-02-2011, 09:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums