My environment is Windows XP and Office 2003.
I have created an access db that draws information from 3 separate shared calendars. One calendar is for tracking scheduled vacation, another is for tracking meetings and the last is for tracking VIP visitors. I create a table to hold each calendar's information to include recurring events over a 6 month window (current date and forward). My code works great for the vacation info pulling in recurring events and their appropriate start and end dates.
My problem comes with getting the information from my meetings calendar. I used the same code from vacations, however the recurring events come in with the the original pattern start and end dates. I want the actual date of the recurring event in the queried time frame.
The vacation calendar has recurring appointments, while the meeting calendar has both recurring appointments and recurring meeting requests. Regardless of the type, I only get the original pattern start and end dates. Any ideas of what I am doing wrong would be greatly appreciated.
here is the code snippet:
mtgAppts.Sort "[Start]"
mtgAppts.IncludeRecurrences = True
Set mtgAppts = mtgAppts.Restrict("[Start] >= '" & Date & " 12:00 am' and [Start] < '" & DateAdd("m", 1, Date) & "11:59 pm'")
Set myAppt = mtgAppts.GetFirst
Do While TypeName(myAppt) <> "Nothing"
rec.AddNew
If myAppt.IsRecurring Then
Select Case myAppt.GetRecurrencePattern
Case 0
recurPat = "Daily"
etc...
End Select
rec!RecurPattern = recurPat
End If
rec!StartDate = Format(myAppt.Start, "mmm/dd/yy")
rec!StartTime = Format(myAppt.Start, "hh:mm AMPM")
rec!EndDate = Format(myAppt.End, "mmm/dd/yy")
rec!EndTime = Format(myAppt.End, "hh:mm AMPM")
rec!Subject = myAppt.Subject
rec!Location = myAppt.Location
rec.Update
Set myAppt = mtgAppts.GetNext
Loop
I have created an access db that draws information from 3 separate shared calendars. One calendar is for tracking scheduled vacation, another is for tracking meetings and the last is for tracking VIP visitors. I create a table to hold each calendar's information to include recurring events over a 6 month window (current date and forward). My code works great for the vacation info pulling in recurring events and their appropriate start and end dates.
My problem comes with getting the information from my meetings calendar. I used the same code from vacations, however the recurring events come in with the the original pattern start and end dates. I want the actual date of the recurring event in the queried time frame.
The vacation calendar has recurring appointments, while the meeting calendar has both recurring appointments and recurring meeting requests. Regardless of the type, I only get the original pattern start and end dates. Any ideas of what I am doing wrong would be greatly appreciated.
here is the code snippet:
mtgAppts.Sort "[Start]"
mtgAppts.IncludeRecurrences = True
Set mtgAppts = mtgAppts.Restrict("[Start] >= '" & Date & " 12:00 am' and [Start] < '" & DateAdd("m", 1, Date) & "11:59 pm'")
Set myAppt = mtgAppts.GetFirst
Do While TypeName(myAppt) <> "Nothing"
rec.AddNew
If myAppt.IsRecurring Then
Select Case myAppt.GetRecurrencePattern
Case 0
recurPat = "Daily"
etc...
End Select
rec!RecurPattern = recurPat
End If
rec!StartDate = Format(myAppt.Start, "mmm/dd/yy")
rec!StartTime = Format(myAppt.Start, "hh:mm AMPM")
rec!EndDate = Format(myAppt.End, "mmm/dd/yy")
rec!EndTime = Format(myAppt.End, "hh:mm AMPM")
rec!Subject = myAppt.Subject
rec!Location = myAppt.Location
rec.Update
Set myAppt = mtgAppts.GetNext
Loop