Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Only Loading Last Event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Only Loading Last Event

 Post Reply Post Reply
Author
Message
JAdauto View Drop Down
Newbie
Newbie


Joined: 12 January 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote JAdauto Quote  Post ReplyReply Direct Link To This Post Topic: Only Loading Last Event
    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
 
 
 
Back to Top
JAdauto View Drop Down
Newbie
Newbie


Joined: 12 January 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote JAdauto Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2011 at 3:26pm
I figured this out so nevermind 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.