Print Page | Close Window

Please help!

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=3545
Printed Date: 18 May 2024 at 2:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Please help!
Posted By: Matt
Subject: Please help!
Date Posted: 21 January 2006 at 2:34pm

Hello,

I've purchased the Calendar control, and am having trouble making recurring entries. I have been over and over the sample program, but can't see what I'm missing thats causing me to fail. Th ereal problem for me is that the sample simply does too much.

Basically I have a calendar and have no problems creating events on it.

I don't need a screen to edit the events, and I don't need a screen for the user to specify the recurrence patterns.

All I want to do is take my calendar event, attach a recurrence pattern to it, populate the pattern options manually, and have the recurrences display on the calendar.


Can anyone list the steps I need to take, and the order they need to be done in, to accomplish this? 

Thanks much

Matt




Replies:
Posted By: sserge
Date Posted: 22 January 2006 at 4:45am
Hi Matt,

Please look at Calendar VB sample, frmMain, Form_Load() handler.
There is some commented code which shows how to create a recurrence.

    Dim NewEvent As CalendarEvent, Recurrence As CalendarRecurrencePattern
 
    ' 1 - Create new event
    Set NewEvent = CalendarControl.DataProvider.CreateEvent
 
    ' 2 - Make it as recurrence (Master event)
    Set Recurrence = NewEvent.CreateRecurrence
   
    ' 3 - Set Master event properties
    NewEvent.Subject = "Recurrence test"
 
'** 3 - Set Recurrence pattern options '******************
 
    ' 3.a - Event Start Time and duration
    Recurrence.StartTime = #3:00:00 PM#
    Recurrence.DurationMinutes = 90
 
    ' 3.b - Start/End dates (see also other End date options)
    Recurrence.StartDate = #1/2/2006#
    Recurrence.EndDate = #10/2/2006#
 
    ' 3.c - Recurrence options
    Recurrence.Options.RecurrenceType = xtpCalendarRecurrenceWeekly
    Recurrence.Options.WeeklyIntervalWeeks = 1
    Recurrence.Options.WeeklyDayOfWeekMask = xtpCalendarDayMo_Fr
    ' 4 - Update recurrence in the master event
    NewEvent.UpdateRecurrence Recurrence
    ' 5 - Add (or update if you edit existing) event
    CalendarControl.DataProvider.AddEvent NewEvent

 
Hopefully that will help. Also try searching other posts here to find more info about recurrences.

--
WBR,
Serge



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