Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - How to Retrieve Schedule from Calendar Cl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to Retrieve Schedule from Calendar Cl

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


Joined: 19 May 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jetlounge Quote  Post ReplyReply Direct Link To This Post Topic: How to Retrieve Schedule from Calendar Cl
    Posted: 19 May 2007 at 9:30am

I am using the control in an Access form. Clicking the Calendar at a certain time I am able to retrieve all properties for that event (time/description, etc)

Is there a way to determine the Schedule that was clicked as well? I can't seem to find that property or sample code.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 9:40am
Something like that:
?

    Dim HitTest As CalendarHitTestInfo
    Set HitTest = Me.CalendarControl1.ActiveView.HitTest

    HitTest.ViewGroup ' <-- This is a schedule group


--
WBR,
Serge
Back to Top
jetlounge View Drop Down
Newbie
Newbie


Joined: 19 May 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jetlounge Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 10:46am
Thanks for the quick reply
 
That doesn't work for all situations, but i think it put me on the right track. Is it safe to assume the following:

1) Click an EXISTING event in the calendar use:
HitTest.ViewGroup
 .MutlipleResources and further properties will get me to the actual SheduleID / Name

2) Click for a NEW event from the calendar control use:
CalendarControl.ActiveView.Selection.GroupIndex
from there it looks like I need to cross-ref the array to determine the scheduleID and name  
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 11:02am
Well, no need to complicate. Those are different things.
-- HitTest determines a last click.
-- CalendarControl.ActiveView.Selection determines a selection of cells on the control.

If you'd like to determine an event by click -- look like it is done in our sample application:

Private Sub CalendarControl_DblClick()
    Dim HitTest As CalendarHitTestInfo
    Set HitTest = CalendarControl.ActiveView.HitTest
   
    If Not HitTest.ViewEvent Is Nothing Then
        MsgBox HitTest.ViewEvent.Event.ScheduleID
    End If
End Sub



--
WBR,
Serge
Back to Top
jetlounge View Drop Down
Newbie
Newbie


Joined: 19 May 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jetlounge Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2007 at 1:51pm
ok, i am missing something...because that will only provide a schedid when an event exists (not .viewevent is nothing).
 
But if i also click a cell and want to add a new event, and populate the add form with the schedid that was clicked, the valid of viewevent and viewgroup is nothing.
 
so i need a way to determine what the schedule is even though an event does not yet exist.
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.189 seconds.