Results 1 to 2 of 2
  1. #1
    Hvns is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    1

    Query Assistance - New User


    Hello everyone,

    So it has been many years since i have cracked open access and have had to dive in to pull out some information needed to get me out of a bind.

    I have a query that gives individual record information for projects. Each project has many lines and each line returns a value - Incomplete or Incomplete... See the example below for reference of the query that provides the base data (Example 1).

    I am needing a query to return the results shown like Example 2 below - Letting me know if a project has the parts needed. Basically if all lines for a project are status complete return 1 line showing Complete, If any a single line of a project shows incomplete then return incomplete.

    A project consists of Project+Line+Step = Project information. (5555.001.100 = 1 project / 4444.001.100 = 1 project / etc...)

    Thank yo in advance for any help you can provide with this.

    Example1 :
    Project Line Step Part# Qty Needed Qty Filled Status
    5555 001 100 T18R0 6 7 Complete
    5555 001 100 A8897 5 5 Complete
    4444 001 100 Z89763 5 5 Complete
    4444 001 100 Z89769 10 5 Incomplete
    4444 001 200 J5598 10 10 Complete
    4444 001 200 J8799 2 2 Complete

    Example 2:
    Project Line Step Status
    5555 001 100 Complete
    4444 001 100 Incomplete
    4444 001 200 Complete

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Here is one way:

    SELECT Project, Line, Step, IIf([StatusCount]=0,"Complete","Incomplete") AS Status
    FROM (SELECT Project, Line, Step, Sum(IIf([Status]="Incomplete",1,0)) AS StatusCount
    FROM table1
    GROUP BY Project, Line, Step) AS Query1;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Assistance designing an archiving query
    By gm_lowery in forum Access
    Replies: 1
    Last Post: 06-14-2012, 01:57 PM
  2. Query and report assistance
    By POS120 in forum Queries
    Replies: 1
    Last Post: 03-18-2012, 04:48 PM
  3. dlookup assistance
    By underscore in forum Access
    Replies: 4
    Last Post: 12-28-2011, 06:32 AM
  4. Assistance in form/query
    By abodi in forum Forms
    Replies: 1
    Last Post: 09-19-2011, 03:30 AM
  5. Query Assistance Needed
    By elotromanuel in forum Queries
    Replies: 1
    Last Post: 03-17-2009, 09:31 PM

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