Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2003
    Posts
    122

    Unanswered: Calendar Control

    I am trying to display 3 seperate 1 month calendars using the built in Calendar Control in Access 2000. I want one to display last month, with no date selected, the other to display this month with today's date selected, and the last to display next month with no date selected. I noticed that there are Previous Month functions etc., but I cannot seem to get them to work. Please help.

  2. #2
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    I would suggest setting the value of each calander control.

    ie.

    Previous month - = DateAdd("M", -1, now())
    Current Date - = now()
    Next Month - = DateAdd("M", 1, now())
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  3. #3
    Join Date
    Sep 2003
    Posts
    122
    Where can I specify these functions? I have tried to goto the Form's on open event, then I have specified something like "calendar01.value=Now()". That didn't work. Any help would be appreciated. I apparently don't know how to code these calendars. A sample to be used on a form's open event would also be helpful. Thanks again.

  4. #4
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    YOu need to enter the code in the Load event of the form. This will set the value of the calender control before the control is loaded.

    I attached an example look at form1's code
    Attached Files Attached Files
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  5. #5
    Join Date
    Sep 2003
    Posts
    122
    Thank you very much. The problem ended up being the "On Load" versus the "On Open." That fixed it all.

  6. #6
    Join Date
    Aug 2003
    Location
    Huntington Beach, CA
    Posts
    9

    Calendar Question

    Originally posted by machado
    YOu need to enter the code in the Load event of the form. This will set the value of the calender control before the control is loaded.

    I attached an example look at form1's code
    Hello Machado,
    Your example helped me a great deal, thanks. I have an additional question... Is there any way I can simply have the calendar show the (current) month without having the day highlighted?

    Thanks,
    Hank

  7. #7
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    Not that I know of. The calander control's value has to be a date and cannot be null or part of a date.

    Look around for a month year picker ActiveX Control I am sure there is one around
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  8. #8
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111

    A little help

    Look at this site: http://www.lebans.com/monthcalendar.htm

    You can find here know-how in vb-access.

    Download the sample and tell me what do you think about.

    Regards.

    Ruas

Posting Permissions

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