Functions for Countdown

S

Shele

I have not been a huge user of access and have only had one class. What I am
unable to find in my old book or in the help section is if there is a
function that will countdown days. Perhaps I am looking in the wrong place.
I have a database that I am using and I am trying to track a probation date
for employees. Any occurence results in a 90 day period of probation.
However, if they go on a seasonal leave, which happens at this time of year,
or are terminated, the count of the probation is supposed to stop. However,
whenever they become an active employee again, the remainder of the 90 days
still needs to countdown. Is there any way to write an If ( ) statement or
somesort of while statement to track that?
 
R

Roger Carlson

It's difficult to say with the information given.

You can show the number of days on probation with the DateDiff function
using the Date function as one of the parameters. Something like this:

=DateDiff("d",Date(),[ProbationStart])+90

(where ProbationStart is the date that the probation started)

However, the tricky part here is how to subtract (or add back in, rather)
the days on leave or unemployed. That all depends on how you intend to
determine the amount of time off. The program can't just know by itself.
If you stored the LeaveStart and LeaveEnd dates, you could find the
difference between them and add that number of days back into your
calculation. But this would only work if you knew the start and ending
dates of the leave. This also would take into account the possiblility of
multiple leaves during the probation period. If that was possible, you'd
have to store these dates in multiple records in a separate table and the
calculation becomes trickier.

I guess the first thing to determine is how you are going to store or
calculate the time(s) that leave is taken.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
S

Shele

I currently have the DateDiff function there, which has worked fine until now.
All our seasonal employees are required to take off 8 weeks. They choose
the start date within a certain time frame. Since the beginning date of the
time off period just started, I have just now realized that I would need to
keep track of the probation time beyond the actual 90 day period.
However, they do not always take off just the 8 weeks or sometimes they do
not comeback until the next season starts, which is a few more months away.
I was hoping there would be an easy answer, but I never get quite that lucky!

If I made a table with the leave dates and the return dates, once I knew the
actual return date, should I then calculate that actual time off, then...?
This is where it seems to get out of my league! Once they returned I could
calculate how many days were left of their probation, but I am not sure what
to do with that info other than enter it manually, which seems like I am
missing the obvious way.


Roger Carlson said:
It's difficult to say with the information given.

You can show the number of days on probation with the DateDiff function
using the Date function as one of the parameters. Something like this:

=DateDiff("d",Date(),[ProbationStart])+90

(where ProbationStart is the date that the probation started)

However, the tricky part here is how to subtract (or add back in, rather)
the days on leave or unemployed. That all depends on how you intend to
determine the amount of time off. The program can't just know by itself.
If you stored the LeaveStart and LeaveEnd dates, you could find the
difference between them and add that number of days back into your
calculation. But this would only work if you knew the start and ending
dates of the leave. This also would take into account the possiblility of
multiple leaves during the probation period. If that was possible, you'd
have to store these dates in multiple records in a separate table and the
calculation becomes trickier.

I guess the first thing to determine is how you are going to store or
calculate the time(s) that leave is taken.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Shele said:
I have not been a huge user of access and have only had one class. What I
am
unable to find in my old book or in the help section is if there is a
function that will countdown days. Perhaps I am looking in the wrong
place.
I have a database that I am using and I am trying to track a probation
date
for employees. Any occurence results in a 90 day period of probation.
However, if they go on a seasonal leave, which happens at this time of
year,
or are terminated, the count of the probation is supposed to stop.
However,
whenever they become an active employee again, the remainder of the 90
days
still needs to countdown. Is there any way to write an If ( ) statement
or
somesort of while statement to track that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Excel Show Countdown Date 7
monthly expiry 9
countdown timer 5
Add three new records 1
Countdown Timer on Form 5
Database design 2
Command button question 1
To hard-code or not for filtering out inactive records 3

Top