Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Basic Unbound Useage
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Basic Unbound Useage

 Post Reply Post Reply
Author
Message
Carl Jensen View Drop Down
Newbie
Newbie


Joined: 23 March 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carl Jensen Quote  Post ReplyReply Direct Link To This Post Topic: Basic Unbound Useage
    Posted: 23 March 2007 at 5:11pm
Hello,

I'm just getting started using the Calendar control in Microsoft Access in unbound mode.  At this point I'm simply trying to add an Event to the calendar and display it on the screen.  I've added both the Calendar and DatePicker controls on a form and placed the following code in the Form_Load event:

--------------------------------------

Me.CalendarControl1.SetDataProvider "Provider=custom"
Me.CalendarControl1.DataProvider.Create
Me.CalendarControl1.DataProvider.Open  
Me.DatePicker2.AttachToCalendar Me.CalendarControl1.Object  
Me.CalendarControl1.ViewType = xtpCalendarMonthView
Me.CalendarControl1.DayView.ScrollToWorkDayBegin

''ADD AN EVENT TO CALENDAR
Dim NewEvent As CalendarEvent
Set NewEvent = CalendarControl.DataProvider.CreateEvent  
NewEvent.Subject = "Test Subject"  
NewEvent.StartTime = "3/20/2007"  
NewEvent.EndTime = "3/20/2007"  
CalendarControl1.DataProvider.AddEvent NewEvent
Me.CalendarControl1.Populate
Me.CalendarControl1.RedrawControl

---------------------------------------

In Access, this code generates an 'Object Required Runtime Error 424' error at this line:

Set NewEvent = CalendarControl.DataProvider.CreateEvent

I'm guessing the DataProvider isn't setup right???  How exactly does it need to be setup to work in a completely unbound mode?  Any help or suggestions to get my head wrapped around this 'very deep' control is much appreciated.

Thanks!
Carl Jensen


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.141 seconds.