minasnoldo
Registered User.
- Local time
- Yesterday, 23:20
- Joined
- Jul 29, 2014
- Messages
- 10
The Attendance Database:
Tables: tblAssociateInfo (general associate info), tblAssociateOccurrences (where the actual occurrences are stored including point value),
Essential fields:
The problem:
Normal occurrence points roll off after 12 months and no longer reflect on an associates attendance score. This is a fairly straight forward query using DateAdd and SUM. The problem is that we have attendance incentives. For example, if someone has a perfect peak season, they get an “occurrence” (entered into tblAssociateOccurrences) for negative 3 (-3) points (there are other examples with a variety of values). This is really where I am beyond my knowledge level (not that I really had any knowledge to begin with).
The basic rules are as follows:
This leaves me in the following predicament:
Does that make sense?
Any Suggestions?

Tables: tblAssociateInfo (general associate info), tblAssociateOccurrences (where the actual occurrences are stored including point value),
Essential fields:
- tblAssociateInfo
o EID (primary key; has a 1 to many relationship with EID on tblAssociateOccurrences, this EID is the “1”) (I Use this to return things like the name for reporting (not important for this question)- tblAssociateOccurences
o EID (the key; has a many to 1 relationship with tblAssociateInfo, this is the many)o OccType (Occurrence type. Eg. Tardy less than 30 minutes, Tardy more than 30 minutes, etc) (This is a Combo Box from a table that holds the occurrence types, description of occurrence, and the point value)o Comments (text box for comments)o Date (MM/DD/YYYY; short date format)o Points (how many points the occurrence is worth)
The problem:
Normal occurrence points roll off after 12 months and no longer reflect on an associates attendance score. This is a fairly straight forward query using DateAdd and SUM. The problem is that we have attendance incentives. For example, if someone has a perfect peak season, they get an “occurrence” (entered into tblAssociateOccurrences) for negative 3 (-3) points (there are other examples with a variety of values). This is really where I am beyond my knowledge level (not that I really had any knowledge to begin with).
The basic rules are as follows:
- Negatives are always added to the total and DO NOT roll off (ever!). But…
o They can be used up. If an associates total points equals -3 and they call in sick (1 point), their new total is -2.
o If the associate then goes a whole year with no occurrences, their point total will still be -2 because being in a negative essentially rolled off the accrued point immediately.
This leaves me in the following predicament:
- I need a query on points for the last 12 months (completed)
- I need a query (or queries to stick in a report or other query)) that is able to accurately calculate the total amount of points carried into the trailing 12 month period taking in to account
o Points that rolled of due to time
o Points that rolled off due to a negative balance
o Returns the points as of 1 year plus 1 day (trailing)
o Points that rolled off due to a negative balance
o Returns the points as of 1 year plus 1 day (trailing)
Does that make sense?
Any Suggestions?

Attachments
Last edited: