Results 1 to 2 of 2
  1. #1
    DonL is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    5

    Aggregate Query

    Having problems with an aggregate query:

    I have a table with fields Job Type, Manager, Start Date, Closed Date.

    Each record identifies a unique job. The Job Type identifies the type of job! One manager could be on many jobs. The start date is the date the job started. The closed date is when the job was closed. If there is no closed date then the job is open.

    At the moment I have created a form that has a text box for the user to enter a 'Week Start Date'. Based on this week start date I need to detail the following:

    • For each job type for the week entered - the total number of jobs started in the week for each manager; the total number of closed jobs for that week; and the total number of open jobs for that week. Total Jobs should = closed + open.


    Without being able to use criteria in the count function I really don't know how to get the open jobs piece out. I'm getting errors such as too complex etc when I do this. What I have so far:



    • Group by Job Type
    • Group By Manager
    • Count Manager (gives total jobs)
    • Where Date added is >=[forms]![Date Capture Form]![text0] And <[forms]![Date Capture Form]![text0]+7
    • Count Date Closed (give closed jobs for that period)
    • Count Date Closed If " " (this is giving me the error to get open jobs).


    Your help is appreciated!

  2. #2
    DonL is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    5
    I've figured it out so no need to reply. Just needed a subquery.

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

Similar Threads

  1. Replies: 0
    Last Post: 04-25-2011, 07:58 PM
  2. Help in aggregate query
    By somm in forum Queries
    Replies: 1
    Last Post: 02-15-2011, 10:18 AM
  3. Aggregate Query Returns No Values
    By Xiaoding in forum Queries
    Replies: 6
    Last Post: 03-29-2010, 02:01 PM
  4. Access SQL Query - Aggregate function
    By jack in forum Access
    Replies: 0
    Last Post: 11-10-2009, 08:06 PM
  5. Using an Aggregate in a query
    By jbh02 in forum Queries
    Replies: 0
    Last Post: 09-15-2009, 07:29 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