Results 1 to 4 of 4
  1. #1
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21

    Query criteria based on SEVERAL values or list (in a table?)


    I know how to setup criteria based on one value. And I also know how you can use the "or" row to add another criteria. But what is you have a list of 20-25 names to add to the criteria?

    I have a table of sales orders shipped that is 1,000's of records. Each line has a project manager. I want to query this table based on a group of project managers. There has to be an easier way to do this than typing in all of their names in each of the queries.

    For example, I want a list of all the sales orders that were from (insert list of 25 project managers) or a want to see the sales orders that (insert list) were not on.

    Can I use a column in another table as a criteria? It seems like I'm just using the wrong terminology and there is an easy solution.


    *I want to do this actually in Access and not VB.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Let queries do the work for you!
    Just create a table or query that has this list of 25 Project Managers, then create a new query linking this table/query to your main table, joining on the Project Manager field.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    add a field to the tManager table, a yes/no field, say, 'report' field.
    join the managers table to the data table and ONLY those marked true will be reported on.
    or
    make a 'pick' table, add personID to this table, join it to the data. only these will get repoted.

  4. #4
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    Worked perfect...thanks! My Access skills are rusty at best...

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

Similar Threads

  1. Change Table Index Values Based on query Values
    By thuzkee02 in forum Import/Export Data
    Replies: 2
    Last Post: 11-24-2015, 11:45 PM
  2. Replies: 9
    Last Post: 05-13-2014, 08:22 AM
  3. Replies: 3
    Last Post: 04-08-2014, 01:02 PM
  4. Replies: 1
    Last Post: 10-29-2012, 08:15 AM
  5. Replies: 2
    Last Post: 05-16-2012, 04:45 PM

Tags for this Thread

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