calendar in Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eriktheviking
    New Member
    • Oct 2007
    • 13

    #46
    Originally posted by msquared

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

    strFirstOfMonth = Str(intYear) & "/" & Str(intMonth) & "/1"
    I think that's sorted it! Many, many thanks.

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #47
      Originally posted by msquared
      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"
      Thanks a million Mary, you have no idea how much I appreciate your response, and subsequent solution to the problem. If you were in front of me right now, I'd kiss ya! (LOL). P.S. - I'll notify the Original Author since I'm sure that he will be interested also. Thanks again.

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #48
        Originally posted by eriktheviking
        I think that's sorted it! Many, many thanks.
        That Mary's something, isn't she? For both of us, I'm happy your issue got resolved.

        Comment

        • eriktheviking
          New Member
          • Oct 2007
          • 13

          #49
          Originally posted by ADezii
          That Mary's something, isn't she? For both of us, I'm happy your issue got resolved.
          She sure is. Thanks for sticking with it ADezii. You're a star.

          Comment

          • MMcCarthy
            Recognized Expert MVP
            • Aug 2006
            • 14387

            #50
            Happy to help!

            Comment

            • truthlover
              New Member
              • Dec 2007
              • 107

              #51
              Hi ADezii,

              Do you still have this file? I've been asked to do this too, but had no idea it could be done in Access.

              Thanks!

              Originally posted by ADezii
              If you are interested, I have a fully functional Calendar created entirely within Access via 1 Table, 2 Forms, 1 Class, and 1 Standard Code Module. It was used as a simple Appointment Calendar for a certain Unit within the Philadelphia Fire Department. It is quite simplistic and easily adaptable. Let me know if you are interested.

              Comment

              • truthlover
                New Member
                • Dec 2007
                • 107

                #52
                Never mind, i found the link elsewhere on the page.
                Thanks!

                Originally posted by truthlover
                Hi ADezii,

                Do you still have this file? I've been asked to do this too, but had no idea it could be done in Access.

                Thanks!

                Comment

                • cgrant
                  New Member
                  • Jan 2009
                  • 2

                  #53
                  Access Calendar Example

                  Originally posted by ADezii
                  If you are interested, I have a fully functional Calendar created entirely within Access via 1 Table, 2 Forms, 1 Class, and 1 Standard Code Module. It was used as a simple Appointment Calendar for a certain Unit within the Philadelphia Fire Department. It is quite simplistic and easily adaptable. Let me know if you are interested.
                  I've built an Access app for a small music school business to register students and produce invoices. I used vba to view and select classes scheduled in Outlook Calendar so that registration records are created. They are adding a second computer so two people can schedule and register. No problem sharing the Access data, but sharing a calendar in Outlook requires Exchange.

                  Could you please send your Fire Dept app for an example? Thanks so much!
                  Charlene

                  Comment

                  • ADezii
                    Recognized Expert Expert
                    • Apr 2006
                    • 8834

                    #54
                    Originally posted by cgrant
                    I've built an Access app for a small music school business to register students and produce invoices. I used vba to view and select classes scheduled in Outlook Calendar so that registration records are created. They are adding a second computer so two people can schedule and register. No problem sharing the Access data, but sharing a calendar in Outlook requires Exchange.

                    Could you please send your Fire Dept app for an example? Thanks so much!
                    Charlene
                    Hello Charlene, I'm sending you a better example of the Calendar since the Fire department Version is proprietary and would not be of much use to you. This Calendar appears to be very popular and I have retrofitted in many times to do things that it was never actually designed to do. Any questions, please feel free to ask.

                    Comment

                    • cgrant
                      New Member
                      • Jan 2009
                      • 2

                      #55
                      Thank you

                      Originally posted by ADezii
                      Hello Charlene, I'm sending you a better example of the Calendar since the Fire department Version is proprietary and would not be of much use to you. This Calendar appears to be very popular and I have retrofitted in many times to do things that it was never actually designed to do. Any questions, please feel free to ask.
                      Thank you! This makes sense and will save me a lot of time.

                      Comment

                      • snydertech
                        New Member
                        • May 2009
                        • 5

                        #56
                        Where is the link?

                        Originally posted by ADezii
                        This may not be the 'final' Version, but I wanted to give you something to work with:
                        I was curious where this link has gone to?

                        Comment

                        • ADezii
                          Recognized Expert Expert
                          • Apr 2006
                          • 8834

                          #57
                          Originally posted by snydertech
                          I was curious where this link has gone to?
                          It's long gone! Give me some more information as to exactly what you are looking for, and I'll see if I can construct a simple Demo for you, something that can have Multi-user potential.

                          Comment

                          • snydertech
                            New Member
                            • May 2009
                            • 5

                            #58
                            I need to set up a nice calendar in access for vaca scheduling. We do this now via excel, however we can't report out of it.

                            So I need to set up a table with tech's, shifts, company vaca days, requested days off, and covering people for those requests.

                            Does this give a little insight? I would like to have the front end to be simple where a person can look at the month and just put their name in for vaca. Then a person sees that and they cover it with their name. In the back end, as long as the data is there, I can pull a report to show who has taken vaca, who covered and how many people still need to find coverage.

                            Thanks!
                            David

                            Comment

                            • ADezii
                              Recognized Expert Expert
                              • Apr 2006
                              • 8834

                              #59
                              Originally posted by snydertech
                              I need to set up a nice calendar in access for vaca scheduling. We do this now via excel, however we can't report out of it.

                              So I need to set up a table with tech's, shifts, company vaca days, requested days off, and covering people for those requests.

                              Does this give a little insight? I would like to have the front end to be simple where a person can look at the month and just put their name in for vaca. Then a person sees that and they cover it with their name. In the back end, as long as the data is there, I can pull a report to show who has taken vaca, who covered and how many people still need to find coverage.

                              Thanks!
                              David
                              Believe it or not, I'm actually in Aruba right now Vacationing, but when I return home I'll see if I can come up with anything for you.

                              Comment

                              • snydertech
                                New Member
                                • May 2009
                                • 5

                                #60
                                Replying to me... while vacationing... get back to relaxing!!!!!

                                David

                                Comment

                                Working...