calendar in Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #31
    What timezone are you using. I saw that you said GMT but which GMT. Give us the exact timezone. What OS are you using?

    Originally posted by eriktheviking
    If it's specific to my computers, then it's weird that I get the same result on my 4 home computers and 3 computers I've tried at my place of work!!! So it is specific and general then. LOL.

    Comment

    • eriktheviking
      New Member
      • Oct 2007
      • 13

      #32
      (GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London.

      Windows XP.

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #33
        Originally posted by eriktheviking
        (GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London.

        Windows XP.
        The only logical assumption is that the Time Zone may be the root of the problem. Shortly, I'll have another Version of the Calendar with several enhancements. As soon as it is finished, and I get the OK from the Author, I'll post it here for you to download and we'll see what happens. Stay tuned to this station. (LOL).

        Comment

        • eriktheviking
          New Member
          • Oct 2007
          • 13

          #34
          Originally posted by ADezii
          As soon as it is finished, and I get the OK from the Author, I'll post it here for you to download and we'll see what happens. Stay tuned to this station. (LOL).
          Thanks, ADezii. I eagerly await the post.

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #35
            Originally posted by eriktheviking
            Thanks, ADezii. I eagerly await the post.
            I'm still waiting, should have it shortly. I mentioned your dilemma to the Original Author and he does 'not' thing that your Regional Settings are the cause of the anomaly. We are still working on it, please be patient.

            Comment

            • eriktheviking
              New Member
              • Oct 2007
              • 13

              #36
              OK, thank you. I appreciate your help.

              Comment

              • ADezii
                Recognized Expert Expert
                • Apr 2006
                • 8834

                #37
                Originally posted by eriktheviking
                OK, thank you. I appreciate your help.
                This may not be the 'final' Version, but I wanted to give you something to work with:

                Comment

                • eriktheviking
                  New Member
                  • Oct 2007
                  • 13

                  #38
                  Originally posted by ADezii
                  This may not be the 'final' Version, but I wanted to give you something to work with:
                  Thanks, but I still get the same error, see: Feb 2008 and March 2008.

                  and

                  Feb2008 and Mar2008
                  Last edited by eriktheviking; Feb 3 '08, 11:35 AM. Reason: To add new hyperlinks

                  Comment

                  • ADezii
                    Recognized Expert Expert
                    • Apr 2006
                    • 8834

                    #39
                    Originally posted by eriktheviking
                    Thanks, but I still get the same error, see: Feb 2008 and March 2008.

                    and

                    Feb2008 and Mar2008
                    I'll keep on trying, but I am really running out of options here. (LOL).

                    Comment

                    • ADezii
                      Recognized Expert Expert
                      • Apr 2006
                      • 8834

                      #40
                      Originally posted by eriktheviking
                      Thanks, but I still get the same error, see: Feb 2008 and March 2008.

                      and

                      Feb2008 and Mar2008
                      Please keep the Graphic Links active, I've contacted the Author and requested he have a look at them. If he cannot get to the bottom of this, I don't know who can.

                      Comment

                      • MMcCarthy
                        Recognized Expert MVP
                        • Aug 2006
                        • 14387

                        #41
                        Just a thought ADezii. Could this have anything to do with the problem using European formatted dates in Access?

                        Comment

                        • ADezii
                          Recognized Expert Expert
                          • Apr 2006
                          • 8834

                          #42
                          Originally posted by msquared
                          Just a thought ADezii. Could this have anything to do with the problem using European formatted dates in Access?
                          Would the actual formatting cause the Dates to be out of sync? Don't really know at this juncture. Anyone I have ever known who has used this Calendar has never had this problem. The same Calendar in everyone's PC works correctly except for erikthevikinig' s, who happens to be in the Greenwich Time Zone. The logical deduction, at least in my mind, is that it must have something to do with the Regional Settings or with the European Formatting of Dates as indicated by yourself. A real dilemma to say the least. The original Author, whom I know well, has not given up on this neither, it's just that we are both stumpped at this point.

                          Comment

                          • MMcCarthy
                            Recognized Expert MVP
                            • Aug 2006
                            • 14387

                            #43
                            Originally posted by ADezii
                            Would the actual formatting cause the Dates to be out of sync? Don't really know at this juncture. Anyone I have ever known who has used this Calendar has never had this problem. The same Calendar in everyone's PC works correctly except for erikthevikinig' s, who happens to be in the Greenwich Time Zone. The logical deduction, at least in my mind, is that it must have something to do with the Regional Settings or with the European Formatting of Dates as indicated by yourself. A real dilemma to say the least. The original Author, whom I know well, has not given up on this neither, it's just that we are both stumpped at this point.
                            Unfortunately, Access is unpredictable with these date issues when regional settings are to European date format. Sometimes they work and sometimes they don't. Imposing a format helps.

                            Check out Ade's tutorial on the subject.

                            Literal DateTimes and Their Delimiters (#)

                            Comment

                            • ADezii
                              Recognized Expert Expert
                              • Apr 2006
                              • 8834

                              #44
                              Originally posted by msquared
                              Unfortunately, Access is unpredictable with these date issues when regional settings are to European date format. Sometimes they work and sometimes they don't. Imposing a format helps.

                              Check out Ade's tutorial on the subject.

                              Literal DateTimes and Their Delimiters (#)
                              Hello Mary, if you get a few minutes could you possibly download Calendar.zip contained in Post #37. Perhaps you can see something in the coding that may be causing this anomaly, something I missed. Thanks.

                              Comment

                              • MMcCarthy
                                Recognized Expert MVP
                                • Aug 2006
                                • 14387

                                #45
                                OK the problem is in the date format.

                                Looking at the following code...

                                [code=vb]
                                Private Sub PopulateCalenda r()
                                On Error GoTo Err_PopulateCal endar

                                Dim strFirstOfMonth As String, bytFirstWeekday OfMonth As Byte, bytBlockCounter As Byte
                                Dim bytBlockDayOfMo nth As Byte, lngBlockDate As Long, ctlDayBlock As Control
                                Dim bytDaysInMonth As Byte, bytEventDayOfMo nth As Byte, lngFirstOfMonth As Long
                                Dim lngLastOfMonth As Long, lngFirstOfNextM onth As Long, lngLastOfPrevio usMonth As Long
                                Dim lngEventDate As Long, bytBlankBlocksB efore As Byte, bytBlankBlocksA fter As Byte
                                Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
                                Dim strSelectEvents As String, strEvent As String, strPlatoons As String
                                Dim intMonth As Integer, intYear As Integer, lngSystemDate As Long 'CFB added 1-25-08
                                Dim ctlSystemDateBl ock As Control, blnSystemDateIs Shown As Boolean 'CFB added 1-25-08

                                lngSystemDate = Date 'CFB added 1-25-08
                                intMonth = objCurrentDate. Month
                                intYear = objCurrentDate. Year
                                lstEvents.Visib le = False
                                lblEventsOnDate .Visible = False
                                lblMonth.Captio n = MonthAndYear(in tMonth, intYear)

                                strFirstOfMonth = Str(intMonth) & "/1/" & Str(intYear)
                                bytFirstWeekday OfMonth = Weekday(strFirs tOfMonth)

                                [/code]

                                strFirstOfMonth value (for today) is "2/1/2008" which is fine for US dates and will return the correct Weekday. However under European dates this is being translated as Jan 2nd. Therefore the wrong Weekday number is being returned (4 instead of 6) for the start of the month.

                                The following would work for European standards but not for US.

                                strFirstOfMonth = "1/" & Str(intMonth) & "/" & Str(intYear)

                                I would suggest trying the following instead as I think it is consistent accross the board.

                                strFirstOfMonth = Str(intYear) & "/" & Str(intMonth) & "/1"

                                Comment

                                Working...