Results 1 to 6 of 6
  1. #1
    prawln is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Posts
    7

    Calendar Day Wrong

    Hey guys,



    I've been looking at a sample database that is used for making appointments etc. When I have my Regional Settings on my computer set to short date (dd/mm/yyyy) then in the ms access calendar it shows the date correct but the actual days are 2 days out. Picture attached called Wrong.

    Then if i set the regional settings to shortdate (mm/dd/yyyy) it makes the date and days etc all correct. Attached picture called right. I have also attached the sample to.

    Any help would be so awesome.

    Thanks guys!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you reviewed this link yet? http://allenbrowne.com/ser-36.html

  3. #3
    prawln is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7
    Cheers Ruralguy!

    I've had abit of a play and changed some of the VB to be DD/MM/YYYY but it still seems to be wrong.

    When I was mucking around I realised when I have the reigonal settings set to short date (dd/mm/yyyy) the calendar is exactly 1 year off. So if I go to 2013 then the date and the day all matches up!

    Im slightly new to this sort of thing so any help would be good.

  4. #4
    prawln is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    7
    Solved the issue

    In VB it had: strFirstOfMonth = Str(intMonth) & "/1/" & Str(intYear)
    When it should have been: strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear)

    Thanks for the link anyways mate, It was good to read!

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Probably, the better code would have used DateSerial instead.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Once you know what to look for it is much better when you solve it yourself. Thanks for posting back with your success and solution.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. What's wrong!
    By khalid in forum Programming
    Replies: 15
    Last Post: 06-27-2011, 06:38 AM
  2. can't figure out what i'm doing wrong
    By m0use in forum Queries
    Replies: 4
    Last Post: 06-16-2011, 09:18 AM
  3. What is wrong with this IFF?
    By bburton in forum Reports
    Replies: 2
    Last Post: 03-16-2011, 10:42 AM
  4. Compiler WRONG example-DB
    By pacala_ba in forum Access
    Replies: 12
    Last Post: 04-18-2009, 01:00 PM
  5. What am I doing wrong?
    By brandon in forum Access
    Replies: 2
    Last Post: 08-03-2008, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums