Results 1 to 2 of 2
  1. #1
    jrosen12 is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2014
    Posts
    5

    Attendance Query w/ Multiple Criteria

    I'm trying to design a query to do something with data that our department is given regarding attendance.



    I want the query to tally how many times a person has been:
    <6 Minutes Tardy (field name: <6)
    >6 and <60 Minutes Tardy (field name: >6<60)
    UPTO (Unexecused Absence) (field name: UPTO)
    NCNS (No Call/No Show) (field name: NCNS)


    Then I want the query to have an expression that determines what kind of consequence is needed, if any. For example, if someone is 10 times <6 minutes Tardy, it should say "Verbal Warning." Each criteria above has about 6 different subsets (i.e. what qualifies as "verbal", "written," etc.)

    I was able to successfully create the query to tally the totals and I have separate expression fields for each of the above criteria. However, the problem is that some people may have multiple instances of breaking policy where one consequence should outrank the other. For example:

    Suzy was 10 times <6 minutes Tardy = Verbal Warning, but also had 1 NCNS, which is a "Final Written." Thus, I want the query to recommend "Final Written" instead of "Verbal Warning." Preferrably, I'd like to do this in a single field versus four different fields.

    Is what I'm trying to do possible, or is it too complex to do in Access?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Doing all in query might not be practical if the necessary conditional expressions to do the analysis are too complex. Might need VBA code. Build a form or report with the query as RecordSource and can have code behind the form/report.
    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. Replies: 3
    Last Post: 10-08-2014, 10:28 AM
  2. Replies: 2
    Last Post: 04-10-2013, 03:54 PM
  3. Replies: 7
    Last Post: 01-02-2013, 11:23 PM
  4. Replies: 1
    Last Post: 05-25-2012, 04:13 PM
  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