Results 1 to 6 of 6
  1. #1
    drennev is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4

    Need results for all employees, defined to a specific month

    Hello. I'm using a crosstab query to pull results for all employees, and want to reflect errors made in a specific month. I've tried to include a date range in my query, but then the employees with no errors during that time period are excluded. I added "is null" and the query then included those with no errors ever, but still excluded those that did not have an error in the dates specified. How do I get all employees?



    Thank you for your help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Did you try joining the crosstab back to the employees table?
    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.

  3. #3
    drennev is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4
    Yes. I first created a query that included the manager, employee, and customer service scores, all from their individual, related, tables. Then I created a second query using that query plus adding the error and error date; it is that query I am using for the crosstab.

    This is a new database with information as of Jan 1. I'm trying to pull January results. I have employees that had no errors in Jan, but did in Feb. Their customer service score is entered. Still, when putting in the date range for January, they are excluded.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The join of crosstab to all employees table should have jointype "Include all records from Employees ...". I don't use crosstabs much but seems that should work.

    Only other approach I know gets complicated. Join the data table to a data source that has all employees associated with all months (jointype "Include all records from EmployeeMonths ...", compound join on employee and month fields, then run crosstab on that query. The EmployeeMonths could probably be a query of employees and months tables. The query would include both table without a join. This will cause every employee to associate with every month.
    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.

  5. #5
    drennev is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4
    Thank you for your suggestions.

    I have the jointype as "Include all records from Employees..." already.

    I tried the other approach of making a "month" table and creating a query of employees and months. I included that in my crosstab, filtered the month to January, and got even less results than before. Either I didn't follow what you were saying, or that isn't working.

  6. #6
    drennev is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4
    I think I found a solution. I copied my error table and deleted all but Jan errors, and included that in my crosstab. I now have all employees and their Jan errors . Maybe not the most efficient way, but it appears to work! Thanks again.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-24-2012, 07:09 PM
  2. How to get a specific number for the current month?
    By Ronald Mcdonald in forum Access
    Replies: 1
    Last Post: 06-14-2012, 11:55 AM
  3. Code results in error on the first day of every month
    By boomerang in forum Programming
    Replies: 6
    Last Post: 11-05-2011, 11:29 AM
  4. Query for specific month
    By bespra in forum Queries
    Replies: 5
    Last Post: 10-22-2011, 07:18 PM
  5. Application-defined or object-defined error
    By hawkins in forum Access
    Replies: 6
    Last Post: 07-01-2011, 01:57 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