Date calculation from start date

acarter1

Registered User.
Local time
Today, 18:04
Joined
Oct 15, 2009
Messages
27
Hi everyone,
i have a form with a doctors record and a subform to show how much annual leave they have taken, there is a "daysleave" field which is how many days they wish to take off, a "startdate" field, an "enddate" field and a remarks field. How can i calculate the end date from the start date excluding weekends? First i input the amount of days they wish to take and then i input a start date, it is ok for calculating one day as it copies the value from the startdate field but not for more than one day.

Thanks in advance!
 
How do i use this in code behind the field it is on the get focus event of the "dateto" field, so at the moment if days leave equals 1 then dateto = datefrom, how do i use the weekday function to make it work out the "dateto" field automatically?

Thankyou!!
 

Users who are viewing this thread

Back
Top Bottom