Results 1 to 4 of 4
  1. #1
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    Help with Query criteria?


    Wow, wasn't even sure how to title this post.!!
    Here's what I got . . .
    I have a database where I keep employee overtime hours. In the database my queries are designed to show total overtime hours employees have worked and total hours of overtime that has been offered to them. I then use this to offer overtime each week, by shift.


    Here is what I have, Example below,


    John Smith Clock #: 114 Total OT Hours worked = 200 Total OT Hours Offered = 270 Shift: A
    Don Grody Clock #: 94 Total OT Hours worked = 201 Total OT Hours Offered = 270 Shift: A
    Sam Riles Clock #: 22 Total OT Hours worked = 197 Total OT Hours Offered = 270 Shift: A
    Dave Keepers Clock #: 400 Total OT Hours worked = 168 Total OT Hours Offered = 270 Shift: A
    John Smith Clock #: 114 Total OT Hours worked = 200 Total OT Hours Offered = 270 Shift: B

    John Smith has been transferred to A Shift permanently, but he is seen in the report twice because he also worked on B shift throughout the year. I want to be able to show all Overtime hours he has worked but only show him on the report once.
    How could this be done, easily?

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,928
    remove shift from your query

  3. #3
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Removing shift from my query would be an easy fix, however I'm filtering my report by shift.
    All employees on A shift are shown 1st on the report,
    Further down on report shows B shift employees and so on.

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,928
    you can still filter on shift - but the reality is if John Doe is in shifts A and B then you will have two rows

    The only other alternative is to show the latest shift rather than group by which shows them both - be aware (if not already so) that first/last/next/previous means nothing in databases without some element of order, be it a date, incrementing UID or similar so you may need to sort your query

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

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  2. Replies: 1
    Last Post: 11-13-2014, 11:34 PM
  3. Replies: 4
    Last Post: 08-30-2014, 10:23 AM
  4. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  5. Replies: 1
    Last Post: 07-13-2011, 11:00 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