Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Activex Calendar control (2002 sp2 )

    I want to change the default month of an activex calendar control in a form.

    I've tried different settings of the calendar itself when it opens, ie:

    On Load, On Got Focus etc,

    Me.ActiveControl.Month = 6

    Essentially i want to have the calendar open on the current month, rather than the default of january thats in the control.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Activex Calendar control (2002 sp2 )

    See <post#=436,180>post 436,180</post: >.

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Activex Calendar control (2002 sp2 )

    Hans, missed that post on my search... but

    I've tried..

    Me.Calendar1.Month = 6


    on the Open even of the form.

    The Activex calendar, is called calendar1

    And the form is called that as well.

    I'm getting error message 348 "Object doesn't support this property or method' (So i'm guessing i'm pointing at the form, not the calendar, in the form?)


    Any idea what i'm doing wrong. ?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Activex Calendar control (2002 sp2 )

    Try using the On Load event of the form instead of the On Open event.

    If Me.Calendar1.Month = 6 doesn't work, try Me.Calendar1.Value = Date or if you want last month, try Me.Calendar1.Value = DateAdd("m", -1, Date)

  5. #5
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Activex Calendar control (2002 sp2 )

    Tried that hans, no luck.

    Tried various combinations as well, can't seem to influence the calendar properties.

    Ideally, i want to be able to set the month it opens up on, to the current month, and the current year, or, 6-7/8 months in the future, of whatever year that happens to be.

    I've cut it down, and zipped it up. so maybe if you get a minute you could have a look.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Activex Calendar control (2002 sp2 )

    It works for me if I use the On Load event of the calendar form. See attached version.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •