automatic workout

lynsey2

Registered User.
Local time
Today, 14:56
Joined
Jun 18, 2002
Messages
439
I have 3 text boxes. Start date, stop date and numberofdays.

Startdate
Default value =Date()

Stopdate
Before update =[Start Date]+([Days]*7)

Numberofdays
Control source =([Stop Date]-[Start Date])

THIS IS FINE for working out the number of days a Doctor wants to write a prescription for BUT they want to be able to enter a number of weeks and have the start, stop date and numberofdays work out automatically from that.

So they want it to work how it does just now but they want to be able to enter a number in a text box (for the number of weeks) which would then take the start date and the number entered work out the number of days and fill out the stop date.

I don't have a scubby how to do this, possibly because it’s early in the morning! I just can't think.
 
Does this take into account weekends (i.e ignore weekends) or just 7 weeks from the start date?

If it's just 7 weeks from the start date you can use the DateAdd() function.

Code:
txtEndDate = DateAdd("d", txtWeeks * 7, txtStartDate)
txtNumberOfDays.Requery
 
:D
cheers Mile think this was my shortest post ever! usualy my quick question post type things land up about 20 pages long!!!:rolleyes: :rolleyes: :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom