Repeating date entries for a given time period

AdamO

Registered User.
Local time
Today, 05:48
Joined
Jun 26, 2002
Messages
40
Hi,

Over the past three months I have been trying to develop an application which can repeat appointment entries.

I would like to have the option to repeat an appointment entry for a given number of weeks.

For example if an appointment entry was placed for today (Wednesday), there would be a command to create additional duplicate enties for the same day of the week for a given period of weeks ie say every Wednesday for the next 52 weeks.

Any help on how I could approach this would be very much appreciated.

Thanks
 
I think the easiest way would be a loop for n weeks something like this:
NumberOfWeeks = NumberOfWeeks - 1
For LP = 0 to NumberOfWeeks
ApptDate = DATEADD("d",LP * 7,StartDate)
' code to record Appt
Next LP
This could record 1 to n weeks of appts for you.
Note - you may have to check to verify there is a slot available how ever.
 

Users who are viewing this thread

Back
Top Bottom