Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - DatePicker ocx and Access
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DatePicker ocx and Access

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


Joined: 13 July 2008
Location: Canada
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote StephenMurphy Quote  Post ReplyReply Direct Link To This Post Topic: DatePicker ocx and Access
    Posted: 13 July 2008 at 10:32pm
I am trying to use the Calendar demo ocx in Access 2003. The control registers ok and I am able to insert an instance of both the Calendar and the Date Picker onto the form and they both appear properly at runtime. However, the correct methods for the DatePicker seem to be missing, and I am only allowed to pick from general ole control properties. I can't access any of the DatePicker specific methods or properties such as AttachToCalendar. I just get the error "Class does not support Automation or does not support expected interface." 

Is there any way to rectify this? I have registered and unregistered the control several times, but it doesn't seem to help.

It works fine in VB6, but not Access. Any help appreciated.
Back to Top
StephenMurphy View Drop Down
Newbie
Newbie


Joined: 13 July 2008
Location: Canada
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote StephenMurphy Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2008 at 11:25am
Just as a followup, I am still unable to get the AttachToCalendar method of the DatePicker control to become available in Access 2003. The datepicker and calendar controls do seem to function properly in the form otherwise.

Is there a way to transfer info from the datepicker to the calendar manually in a SelectionChanged event? The following seems to work:

Private Sub DatePicker1_SelectionChanged()
Dim dpSel As DatePickerSelection

    Set dpSel = DatePicker1.Selection
   
End Sub

Is there a way to tell the calendar to use that selection in its current view?

Any help appreciated.
Back to Top
dr.iak View Drop Down
Newbie
Newbie


Joined: 30 March 2008
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote dr.iak Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2008 at 7:02am

Hello,

I also use the datepicker and the calendar control in an Access 2003 project and the AttachToCalendar method works perfectly.

Greetings

Bernd
Back to Top
StephenMurphy View Drop Down
Newbie
Newbie


Joined: 13 July 2008
Location: Canada
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote StephenMurphy Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2008 at 11:27am
Originally posted by dr.iak dr.iak wrote:


Hello,

I also use the datepicker and the calendar control in an Access 2003 project and the AttachToCalendar method works perfectly.

Greetings

Bernd


Isn't that odd? I have tried it on two machines here with Access 2000/2003 and 2007, and in all three environments, the DatePicker control is missing many methods that Intellisense does not pick up. Perhaps because there are two interfaces in the ocx and Access on my machines is ignoring the second. I unregistered and re-registered the control several times but that didn't help.

My solution was to make the call as follows:

Call DatePicker1.AttachToCalendar(Me.CalendarControl1.Object)
 
That did the trick and connected the two.
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.172 seconds.