Print Page | Close Window

Only Loading Last Event

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=17778
Printed Date: 29 April 2024 at 5:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Only Loading Last Event
Posted By: JAdauto
Subject: Only Loading Last Event
Date Posted: 12 January 2011 at 11:50pm
I am attempting to evaluate this product, and while it seems to have everything I need and more, I cannot seem to get my events to load on my calendar.  My evaluation period is almost up and I am yet to show my CEO any screen shots. Any help would be appreciated.
 
I have the code below, and it doesn't error out, however, it only loads the LAST event to my calendar. I have tried moving the Populate, but nothing seems to matter. I am sure this is something very simple, but it has been such difficult process to show my events thus far.  Any suggestions would be appreciated.
 
 
'gets collection of my events from the SQL table
Set lo_EventCol = MctcManager.CATManager.GetCalendarCol(MctcRoutines.GetDatePart(Now))
   
For Each lo_Event In lo_EventCol
        ll_EventID = lo_Event.ID
       
        Set lo_Calendar = Me.XCalendar
        lo_Calendar.SetDataProvider "Provider=custom"
       
        Set lo_CalendarEvent = lo_Calendar.DataProvider.CreateEventEx(ll_EventID)
        If lo_CalendarEvent Is Nothing Then
            'no action
        Else
            lo_CalendarEvent.Subject = lo_Event.EventName
            lo_CalendarEvent.StartTime = lo_Event.StartDate
            lo_CalendarEvent.EndTime = lo_Event.EndDate
           
            lo_CalendarEvent.EventVisible = True
 
            If Not lo_Calendar.DataProvider.Open Then
                lo_Calendar.DataProvider.Create
            End If
            lo_Calendar.DataProvider.AddEvent lo_CalendarEvent
           
        End If
    Next lo_Event
   
    lo_Calendar.Populate
 
 
This only loads my LAST event to the calendar.  Ideas?
Thanks,
JAdauto
 
 
 



Replies:
Posted By: JAdauto
Date Posted: 13 January 2011 at 3:26pm
I figured this out so nevermind 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net