Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calendar Problem (A2K SR1)

    I have several forms that have calendar functions which all appear to work find except one.
    When the calendar button is pressed, the date returned is 12/30/1899. The calendar appears but
    when today

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Problem (A2K SR1)

    I don't know if I understand what you're trying to do, but just yesterday I had an error that kept returning an 1899 date...It was because I was trying to put a string in a date variable. My solution was to make sure my date was surrounded with pound signs: #2/17/2003#.

    I have no idea if this helps you, but maybe it's something you can check.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Problem (A2K SR1)

    12/30/1899 is the date you get when you pass a zero into a date field or when there is nothing but a time (decimal value) in a date field.
    Charlotte

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Problem (A2K SR1)

    I've had similar problems with calendar controls before.
    I used to use the Date & Time picker which is quite good, but can be a little tricky to control.

    I changed mine to a form based calendar which proved to have much more flexibility controlling with VBA.
    As Charlotte points out, if the calendar control does not default or hold the current date, it gets quite confused and shows the 1899 date.
    If you want a demo of the form based calendar, let me know and I'll post it.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Problem (A2K SR1)

    Yes, the calendar control is not as robust as the date/time picker or the monthview controls. I was working on a demo using the calendar control, but it kept crashing Access for no reason I could determine. We actually use one in our Access 97 commercial applications, but it gives us problems on WIndows XP machines for some reason. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  6. #6
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Problem (A2K SR1)

    Dave,
    I would very much appreciate your posting the form based canendar. I can not figure why my calendars work everywhen except on this one date. The calender on another date on the same form works perfectly. Hopefully your solution will solve my problem.

    Tom

  7. #7
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Problem (A2K SR1)

    Thanks for the suggestion. The date is being entered by the calendar so I don't know how you could use the # around the date.

    Tom

  8. #8
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Problem (A2K SR1)

    Try this one Tom.
    Attached Files Attached Files

Posting Permissions

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