![]() ![]() ![]() ![]() ![]() Gravitybox Schedule Primer
Page 104
1998-2004 Gravitybox Software LLC
Figure 11.3
The Recurrence object itself has properties that constrain
the number and range of the specified recurrence pattern.
The StartDate defines the starting point of the recurrence
pattern. The default is the date of the appointment used as
the template for the pattern. The termination of the pattern may be issued in any one of
three ways. If there is No end date specified, the recurrence pattern will continue until
the MaxDate property of the schedule is reached. An end date may be specified so that
an appointment may be created on this date but never after this date. The pattern may
also end after a certain number of occurrences. You may wish for only five
appointments to be made. If this termination method is specified, only that number of
appointments or less will be created. If the MaxDate of the schedule is reached before
the specified number of appointments is created, there will be fewer appointments
created than specified.
Call Schedule1.ScheduleItems.Add("", #1/7/2002#, "", #10:00:00
AM#, 60, "Weekly Meeting")
oRecurrence.RecurrenceInterval = ricWeekly
oRecurrence.EndType = recNoEnd
oRecurrence.StartDate = #1/7/2002#
oRecurrence.RecurrenceWeek.UseMon = True
oRecurrence.RecurrenceWeek.WeekInterval = 1
Call Schedule1.ScheduleItems.AddRecurrence(1, oRecurrence)
The code above will add an appointment January 7, 2002. This appointment will then be
used as a template to create a recurring pattern. All other appointments will use this
template appointments start time and length as their own. The interval will be weekly
with no ending point. The recurrence pattern will begin on January 7, 2002 and continue
Quick Tip
The appointments in a Recurrence
pattern do not have to share any
attributes other than the same
GroupId property if desired.
|