Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65

    Unanswered: Calendar Control

    Hi,
    Have a small problem. I am trying to use the "Today" command for my calendar. Should I use this in "On Open" or "On Load". Currently I use "On Open" to open my dbase via macro. I have tried to use "On Load->event procedure->ActiveXctl26.Today" to use the calendar. It does not work. However it has worked this way in the "On Load". Confused yet?

    If I have to use "ActiveXctl.Today" in "On Open", I then have a problem of opening my dbase maximized.

    Sorry if this is confusing.

    Thanks
    Mike

  2. #2
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239
    Hi.

    "On Load" I'm using:
    Me.Planned_Date.Value = Format(Now(), "dd.mm.yyyy")

    Where Planned_Date is the ActiveX calendar control.

    Sincerely
    Vestigo

  3. #3
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65
    Thanks Vestigo but this didn't help. I did fix the maximize problem. "On Load->docmd.maximize" but the calendar control will not work. I dumped the calendar and reloaded it. No Joy. Any suggestions?

    Thanks
    Mike

  4. #4
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Calendar

    Hi

    Have you a added the "Me.Calendar1 = Format(Now(), "dd.mm.yyyy")" string in the Event procedure of the form where the calendar control is located ?
    Hmmm….
    Try to add a button and put the same string into the "On Click" event.

    Sincerely
    Vestígõ
    Attached Thumbnails Attached Thumbnails calendar.jpg  

  5. #5
    Join Date
    Apr 2004
    Posts
    4

    Talking

    Hi,

    In use the following OnLoad sub:
    Me.Calendar1.Value = CDate(DateValue(Now()))

    Calendar1 should be renamed to your calendar control

    Works like a charm.

    Sinceraly,
    Joost

  6. #6
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65
    Thanks for the help Vestigo and Joostv, I got it fugured out, I ran debug and references. I found that I had several VBA out of sequence. when I got them back in order everything worked fine.

    Once again thanks
    Mike

Posting Permissions

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