Module not working

Jkittle

Registered User.
Local time
Today, 02:02
Joined
Sep 25, 2007
Messages
100
I'm having trouble with my vacation tracker database.

The allotted vacation time keeps defaulting to 160 hours. If I open the "add/edit employees form from the main menu and click on details, it changes the allotted hours from what I had back to 160.

Any help is appreciated.
 

Attachments

This would appear to be the culprit, in the current event:

=setavHrs()
 
I'm not seeing where this is?
 
The current event of the little form that pops up when you click on details.
 
Okay, what should I change it to so it works for cases? If I delete it then nothing works.
 
J,

Your Function "setavHrs" for calculating vacation hours is flawed:

The lTime that is calculated with the DateDiff and the Employees Anniversary date
will always be < 1.

If that is supposed to be a rough number of months (for the year so far), try
dividing by 30, or use Months in the DateDiff calculation itself.

Also, they could be 0 months into the year. The first Case should have only
a "< 3" check to account for that.

Also, all of the sample employees have a cat value of 2 (160 hours).

Follow the code with the Debugger at some Break Point, or simply put
STOP in the code temporarily.

Just some thoughts.
Wayne
 
Thanks Paul and Wayne. I'm seeing many issues now. This was supposed to make my job easier not harder.
 

Users who are viewing this thread

Back
Top Bottom