Text box default

robert693

Registered User.
Local time
Today, 21:43
Joined
Mar 22, 2001
Messages
38
I have an employee leave database. If an employee has been employed more than five years, he or she gets 25 days off per year, less than 5, 20 days off. Part time employees get a variable amount of days off. I want a text box that will default to the number of days off each employee will get based on the length of time employed and still be able to manually enter the amount of time off other employees, such as part time, will get. Thank you for any help you can give.
 
in the AfterUpdate of the time employed field, put a quick if then statement..

if (full time) then
if [Time Employed] >=5
me.daysoff = 25
else
me.daysoff = 20
end if
end if

As long as the control daysoff isn't locked, you'll be able to change it and put days off in there for part-timers... Make sure to include the 5 years... You didn't mention how many days they get if they've been there for exactly 5 years, so I threw it in to >= 5 years... I hope this helps..

Doug
 

Users who are viewing this thread

Back
Top Bottom