MS Access Calendar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #61
    Originally posted by mshmyob
    I use AC2007 and although I don't use this calendar code (I use my own) it works for me in AC2007. Maybe you could be more specific at what does not work.

    'I just know Ade doesn't have AC2007 so I thought I would help him on this one. lol'

    cheers,
    Thanks for the assist, and you are correct in that I do not have Access 2007. I do not, however, see any reason why it would not work in Access 2007, the code is generic enough.

    Comment

    • aeromon
      New Member
      • Aug 2008
      • 4

      #62
      Well, I have a database (in access 2007 format and am trying to import the calander into it.
      I am simply going to use the calander for weather stuff (the database is for a small construction firm and we would like to have a record of the weather so if a client calls and asks why we havent concreted their driveway, we can say it has been raining from 8/8/08 to 12/8/08 etc)
      Anyway, when i try to copy and paste the calander files, or drag the calander files or even import them, I get the error

      "Error in populateCalande r()"
      "Type Mismatch"

      I can open the calander in its native format (2003) and dont have any dramas. The calander is fantastic though.
      I have uploaded the database if anyone can help me out it would be greatly appreciated
      http://rapidshare.com/files/138450652/SCG_Database_2. 0.accdb.html



      Thanks
      aeromon

      Comment

      • mshmyob
        Recognized Expert Contributor
        • Jan 2008
        • 903

        #63
        OK I am downloading it. Next time attach it to your message here.

        I will get back to you.

        cheers,

        Originally posted by aeromon
        Well, I have a database (in access 2007 format and am trying to import the calander into it.
        I am simply going to use the calander for weather stuff (the database is for a small construction firm and we would like to have a record of the weather so if a client calls and asks why we havent concreted their driveway, we can say it has been raining from 8/8/08 to 12/8/08 etc)
        Anyway, when i try to copy and paste the calander files, or drag the calander files or even import them, I get the error

        "Error in populateCalande r()"
        "Type Mismatch"

        I can open the calander in its native format (2003) and dont have any dramas. The calander is fantastic though.
        I have uploaded the database if anyone can help me out it would be greatly appreciated
        http://rapidshare.com/files/138450652/SCG_Database_2. 0.accdb.html



        Thanks
        aeromon

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #64
          Originally posted by mshmyob
          OK I am downloading it. Next time attach it to your message here.

          I will get back to you.

          cheers,
          Thanks mshyob, I'm dead in the water on this one. When you find the answer to the problem, and I know you will, kindly post it here since this little Calendar Application seems to be fairly popular, and I would like to get a handle on any potential problems which may arise. Thanks.

          Comment

          • mshmyob
            Recognized Expert Contributor
            • Jan 2008
            • 903

            #65
            OK. Easy fix.

            Access 2007 uses DAO by default again but AC200-2002 uses ADO by default.

            You therefore need to look for the following line under the PopulateCalenda r routine

            [code=vb]
            Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
            [/code]

            and change it to

            [code=vb]
            Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As DAO.Recordset
            [/code]

            Or of course change your Access 2007 settings to use ADO again.

            cheers,

            Originally posted by ADezii
            Thanks mshyob, I'm dead in the water on this one. When you find the answer to the problem, and I know you will, kindly post it here since this little Calendar Application seems to be fairly popular, and I would like to get a handle on any potential problems which may arise. Thanks.

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #66
              Originally posted by mshmyob
              OK. Easy fix.

              Access 2007 uses DAO by default again but AC200-2002 uses ADO by default.

              You therefore need to look for the following line under the PopulateCalenda r routine

              [code=vb]
              Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
              [/code]

              and change it to

              [code=vb]
              Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As DAO.Recordset
              [/code]

              Or of course change your Access 2007 settings to use ADO again.

              cheers,
              Appreciate the help, thank you.

              Comment

              • aeromon
                New Member
                • Aug 2008
                • 4

                #67
                I appreciate this so much
                You are all so fantastic. I got it working with your help
                Thanks heaps

                -aeromon

                Comment

                • ADezii
                  Recognized Expert Expert
                  • Apr 2006
                  • 8834

                  #68
                  Originally posted by typhoo
                  Adezii

                  im absolutely over the moon with this, you did it so quickly aswell!! thanks very very very very much!
                  1. Hello typhoo, I noticed that the Horizontal Scroll Bar is visible in lstEvents. You can eliminate this by setting the following properties in lstEvents:
                    Code:
                    Column Widths: 0";0.5";6.25"
                    Width: 7"
                  2. You can also set the Column Heads of lstEvents to: Yes

                  Comment

                  • SteveShelton
                    New Member
                    • Mar 2007
                    • 22

                    #69
                    Thanks for all the help on this. I have vacation planner started and this is going to tie in great with what I started!!

                    Steve

                    Comment

                    • SteveShelton
                      New Member
                      • Mar 2007
                      • 22

                      #70
                      OK

                      I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.

                      I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?

                      Steve

                      Comment

                      • ADezii
                        Recognized Expert Expert
                        • Apr 2006
                        • 8834

                        #71
                        Originally posted by SteveShelton
                        OK

                        I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.

                        I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?

                        Steve
                        As stated in the PM, I will need the Database in order to see first hand. This Calendar was never meant to be an Event Planner or Scheduler, that's why everything must basically be customized.

                        Comment

                        • ADezii
                          Recognized Expert Expert
                          • Apr 2006
                          • 8834

                          #72
                          Originally posted by SteveShelton
                          OK

                          I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.

                          I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?

                          Steve
                          Hello Steve, each Record in tblEvent represents a specifc Event (e.g. Event 1) between a specified Date Range, namely [Date] ==> [Date Finish]. This Range must be broken down into individual Days within the Range in order to accurately display within the Calendar.

                          If Event 1 was scheduled between 1/1/2008 and 1/5/2008, it would have to be expanded to 5 Days, 5 Records, so that they can be represent ed in the Calendar:
                          Code:
                          Event 1 - 1/1/2008
                          Event 1 - 1/2/2008
                          Event 1 - 1/3/2008
                          Event 1 - 1/4/2008
                          Event 1 - 1/5/2008

                          Comment

                          • SteveShelton
                            New Member
                            • Mar 2007
                            • 22

                            #73
                            That makes since. I have sent you the shell of the database. I have just started on it so some of of it is crude. Took out all the forms except the calendar.

                            Thanks again.

                            Steve

                            Comment

                            • ADezii
                              Recognized Expert Expert
                              • Apr 2006
                              • 8834

                              #74
                              Originally posted by SteveShelton
                              That makes since. I have sent you the shell of the database. I have just started on it so some of of it is crude. Took out all the forms except the calendar.

                              Thanks again.

                              Steve
                              As per the problem which you had indicated to me earlier:
                              1. You must redefine the Variable strSQL2 in the PopulateEventsL ist() Sub-Routine, as in:
                                Code:
                                Private Sub PopulateEventsList(ctlDayBlock As Control)
                                On Error GoTo Err_PopulateEventsList
                                Dim strSQL2 As String
                                
                                strSQL2 = "SELECT tblEventTemp.Owner, tblEventTemp.Event, tblEventTemp.EventID " & _
                                          "FROM tblEventTemp WHERE tblEventTemp.Date = " & _
                                           ctlDayBlock.Tag & " ORDER BY tblEventTemp.Date;"
                                
                                lstEvents.RowSource = strSQL2
                                
                                lblEventsOnDate.Caption = Format(ctlDayBlock.Tag, "m-dd-yyyy")
                                lstEvents.Visible = True
                                lblEventsOnDate.Visible = True
                                    
                                Exit_PopulateEventsList:
                                  Exit Sub
                                  
                                Err_PopulateEventsList:
                                  MsgBox Err.Description, vbExclamation, "Error in PopulateEventsList()"
                                  Resume Exit_PopulateEventsList
                                End Sub
                              2. Change the Column Widths Property in the Events List Box, since it will now be used display the Owner and Event. Use settings similar to 2;1;0.

                              Comment

                              • SteveShelton
                                New Member
                                • Mar 2007
                                • 22

                                #75
                                Thanks that worked.

                                I am trying to prefill on one form before the calendar to set the vacation up. On the form I have a combo box that list the employees. I have a querry that list the employees from another table. I have been reading and found this code but I can not get it to prefill the the rest of the information about the employee I have tried to adapt it for mine not much luck.

                                Code:
                                Public Sub MatchCombo(frmData As Form)
                                Dim Rst As DAO.Recordset
                                Dim strMark As String
                                Dim strSql As String
                                
                                On Error GoTo rBookmark_Error
                                
                                Set Rst = frmData.RecordsetClone
                                
                                Rst.FindFirst "[Emploee] = " & frmData!Combo8
                                strMark = Rst.Bookmark
                                frmData.Bookmark = strMark
                                
                                Set Rst = Nothing
                                exit_Bookmark:
                                Exit Sub
                                rBookmark_Error:
                                MsgBox Err.Number & vbCrLf & Err.Description
                                Resume exit_Bookmark
                                End Sub
                                Last edited by Stewart Ross; Nov 21 '08, 10:47 AM. Reason: Please use the code tags provided - enhances readability of your post

                                Comment

                                Working...