By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

180 day rollover of records

P: n/a
I have an employee absence table to track attendance. If someone gets
a point for taking a day off, that point will stay on their record for
180 days. Also, if someone gets a verbal or written warning, that will
stay on their record for 364 days.
My question is.... How do I accomplish this 'rollover' that will run
everytime I open the database to enter records.

Thanks for any assistance with this.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Assuming a normalized data structure; just use a WHERE clause to
exclude the unwanted records.

Now I have no idea what your tables are like, but the query could look
*roughly* something like the following. The key being the left join on
the employee ID along with the WHERE clause.

SELECT tblEmployee.EmpID, tblAttendance.Prob [etc..] FROM tblEmployee
LEFT JOIN tblAttendance ON tblEmployee.EmpID = tblAttendance.EmpID
WHERE tblAttendance.ProbDate>Date()-180;

- Jim

On 30 Jun 2004 05:05:18 -0700, nj**********@suscom.net (Norma) wrote:
I have an employee absence table to track attendance. If someone gets
a point for taking a day off, that point will stay on their record for
180 days. Also, if someone gets a verbal or written warning, that will
stay on their record for 364 days.
My question is.... How do I accomplish this 'rollover' that will run
everytime I open the database to enter records.

Thanks for any assistance with this.


Nov 13 '05 #2

P: n/a
nj**********@suscom.net (Norma) wrote in message news:<20**************************@posting.google. com>...
I have an employee absence table to track attendance. If someone gets
a point for taking a day off, that point will stay on their record for
180 days. Also, if someone gets a verbal or written warning, that will
stay on their record for 364 days.
My question is.... How do I accomplish this 'rollover' that will run
everytime I open the database to enter records.

Thanks for any assistance with this.


First off, use a query. Something like...

For days off:
SELECT ...
FROM tblAttendance
WHERE AbsenceType='Personal Day'
AND DateDiff("d",Date,DateTaken)<=180

for warnings:
SELECT ...
FROM tblAttendance
WHERE AbsenceType='Warning'
AND DateDiff("d",Date,DateTaken)<=364
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.