Results 1 to 4 of 4
  1. #1
    srmezick is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Tenure Summary Report Question

    I am attempting to create a report that will count the number of employees within a certain range of employment. Over 90 days, 61 to 90 days, 31 to 60 days, and 0 to 30 days. I will also have to report them by shift and plant wide...



    I know that using Dcount I should be able to create a function that will make this calculation but so far I havent had any luck.

    What I would like is for DCount to count the number of Employee IDs (Column name "ID") in the table "Employee Information" which have a hire date (column "Hire Date") that falls before today's date minus 91, and then another function for between today's date minus 90 and today's date minus 61 ... and so on. If someone wouldnt mind helping it I would greatly appreciate it.

    Here is the function that I am currently trying to make work...

    =dcount([ID], "Employee Information Table", "[Hire Date] = before '# date()-90 #'")


    if you can tell me what's wrong with it that would also help me in the future I think.



  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    What I would do is to create a query that categorizes each employee based on the 4 categories you mention, something like this:

    query name: qryCategories
    SELECT [Employee Information Table].ID, [Employee Information Table].hiredate, IIF(hiredate<dateadd("d", -90, date()), "> 90", IIF(hiredate >=dateadd("d",-30,date()),"<30",IIF(hiredate<dateadd("d",-30,date()) and hiredate>=dateadd("d",-60,date()),"31-60","61-90"))) AS HireDateCategory, datediff("d",date(),hiredate) AS DifferenceInDays
    FROM [Employee Information Table];


    Then I would create a query from the above that does the counting:

    SELECT qryCategories.HireDateCategory, Count(qryCategories.HireDateCategory) AS CountOfHireDateCategory
    FROM qryCategories
    GROUP BY qryCategories.HireDateCategory;

  3. #3
    srmezick is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Thanks

    Thanks so much for your reply. It wasnt exactly how I was hoping to make this happen, but it will definatly get the job done. I was already half way there having already created the queries for each category, now I just need to create the crosstab queries. =)

    Thanks Again,

    Stephanie

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome and good luck with the crosstab queries. I do not have much experience with crosstab queries, so I cannot offer help there.

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

Similar Threads

  1. Creating Summary Page in Access Report
    By jakeman in forum Reports
    Replies: 5
    Last Post: 10-11-2011, 06:25 PM
  2. Replies: 9
    Last Post: 04-27-2011, 05:04 PM
  3. Order Summary Report
    By ryonker in forum Reports
    Replies: 1
    Last Post: 01-10-2011, 09:15 PM
  4. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  5. Summary Report Help Please?
    By solitaire in forum Reports
    Replies: 3
    Last Post: 03-03-2006, 08:10 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