Is it possible to select several sequential dates in a calendar object?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jo at Isla
    New Member
    • May 2010
    • 19

    #1

    Is it possible to select several sequential dates in a calendar object?

    I am away from UK travelling - hence no access to my VB software and previous build notes etc but have said that i will build a simple reservation system for the people with whom i am staying.

    I have a need to highlight several sequential dates from a calendar object and have these show in separate textboxes - does anyone know how i could accomplish this?

    I am really loathe to use Excel for this aspect of the build - but feel it may be my only option in the circumstances.. .

    Would really appreciate any help in this regard.
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    What kind of a calendar object are you using?

    Is there a defined number of textboxes you need to use (e.g) a maximum of seven?

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      I may be able to accomplish this via the Custom Calendar Database that is frequently displayed here @ Bytes. Give me a little time to figure it out.

      Comment

      • Jo at Isla
        New Member
        • May 2010
        • 19

        #4
        I apologise for time delay - am currently in Isla Mujeres - Mexico! well away from my comp notes and software facilities :-( hence this forum and your kindness in communicating with me - for which i THANKYOU :-)

        My head is buzzing with ideas but i am limited by the software available to the hotel ie MS Access 2003 and my memory!

        I am using the calendar object in MS Access 2003 - this allows me to enter a room reservation start date and leave date. However i need to replicate a grid like view that will allow me to select a series of dates booked for a given hotel room. ie calendar dates to go across the top by 18 rooms down.

        Being totally out of ideas with regard to MS Access (dont have vb6 with me) I am going to have a play in Excel ..... for this part of my proposed system build!

        I am gifting the software build in repayment of accommodation kindness. Any ideas or directions that you can face me toward would be really appreciated...

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          Originally posted by Jo at Isla
          I apologise for time delay - am currently in Isla Mujeres - Mexico! well away from my comp notes and software facilities :-( hence this forum and your kindness in communicating with me - for which i THANKYOU :-)

          My head is buzzing with ideas but i am limited by the software available to the hotel ie MS Access 2003 and my memory!

          I am using the calendar object in MS Access 2003 - this allows me to enter a room reservation start date and leave date. However i need to replicate a grid like view that will allow me to select a series of dates booked for a given hotel room. ie calendar dates to go across the top by 18 rooms down.

          Being totally out of ideas with regard to MS Access (dont have vb6 with me) I am going to have a play in Excel ..... for this part of my proposed system build!

          I am gifting the software build in repayment of accommodation kindness. Any ideas or directions that you can face me toward would be really appreciated...
          ADezii is going to look at the MS Access Calendar object for you.

          This is an ingenious application he has put together which has been found to be very useful by many of our members. I'll leave you in his capable hands.

          Comment

          • Jo at Isla
            New Member
            • May 2010
            • 19

            #6
            Originally posted by ADezii
            I may be able to accomplish this via the Custom Calendar Database that is frequently displayed here @ Bytes. Give me a little time to figure it out.
            Thank you Adezzii - I was hoping that you would pick me up on this :-) If you are UK based then you are 6 hours ahead of me! Its 8.20am for me at time of posting.

            I have used the MS Acess calendar object to allow a to and from date to be captured into text fields. I now need to look at how i can view rooms booked for a given set of calendar dates - everything else in my proposed build is well documented in memory as have done so many times before!

            e.g Calendar dates across the top by 20 room numbers grid - within which i can select calendar dates booked for a given room.

            All my previous builds have been wage, data analysis in orientation - first time of trying to build a calendar type aspect to a system - therefore very much appreciate your help in this regard.

            Comment

            • Jo at Isla
              New Member
              • May 2010
              • 19

              #7
              Originally posted by msquared
              adezii is going to look at the ms access calendar object for you.

              This is an ingenious application he has put together which has been found to be very useful by many of our members. I'll leave you in his capable hands.
              thankyou :-)

              Comment

              • ADezii
                Recognized Expert Expert
                • Apr 2006
                • 8834

                #8
                I was unable to reproduce the exact functionality that you had requested with the Calendar Database, but I have created an Application that may/may not prove interesting to you. Only you can make that decision.
                1. Download the Attachment that I have made available to you.
                2. For this Demo, enter data directly into the tblBookings Table. Use the supplied Drop Down Menu for [Room_ID] (Room 1 to Room 20), enter a [Start Date] and [Leave Date]. These 3 Fields are required and cannot be NULL. I provided a limited amount of sample data for May only.
                3. Open frmCalendar which will graphically display the data entered into tblBookings, and provide a visual cue as to which Rooms are occupied for any specific date on a monthly basis.
                4. Left-Click on any date to display detailed information related to that date in the List Box below the Calendar. The information displayed will be: the Room ID, Room Name, Start Date, Leave Date, and the Duration (in nights), for the Room(s) displayed for the specific date chosen.
                5. Since you are from the UK, you may experience some problems with dates and days being out of sync. Should this be the case, Uncomment Line #8 below, and Comment Line #3. This code can be found in the PopulateCalenda r() Procedure within frmCalendar.
                  Code:
                  'code above intentionally omitted
                  
                  strFirstOfMonth = str(intMonth) & "/1/" & str(intYear)
                  
                  '*************************************************************************
                    'ADezii
                    'NOTE: Will work in the UK (United Kingdom) and other European Nations
                    'strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear)
                  '*************************************************************************
                  
                  'code below intentionally omitted
                6. Do not modify any other portion of the code unless you know what you are doing.
                Attached Files

                Comment

                • Jo at Isla
                  New Member
                  • May 2010
                  • 19

                  #9
                  Wow :-)

                  Hi Adezzii thankyou so much for showing me the solution that you came up with - I was unable to enter data into the table part, and guessed that from there it would then show in a relevant calendar date/series of dates.

                  Is it possible for you to send me a copy that i can explore data entry with?

                  It looks to be perfect for what i am thinking of using it for :-) I totally understand about the UK date system, but I am designing/building this system for use by a small hotel run by mother/daughter in Mexico.

                  Knowing that this aspect is sorted! I will now look to build the other forms etc that will interact with the calendar form.

                  I look forward to receiving a working version

                  Regards
                  Jo

                  Comment

                  • ADezii
                    Recognized Expert Expert
                    • Apr 2006
                    • 8834

                    #10
                    Originally posted by Jo at Isla
                    Hi Adezzii thankyou so much for showing me the solution that you came up with - I was unable to enter data into the table part, and guessed that from there it would then show in a relevant calendar date/series of dates.

                    Is it possible for you to send me a copy that i can explore data entry with?

                    It looks to be perfect for what i am thinking of using it for :-) I totally understand about the UK date system, but I am designing/building this system for use by a small hotel run by mother/daughter in Mexico.

                    Knowing that this aspect is sorted! I will now look to build the other forms etc that will interact with the calendar form.

                    I look forward to receiving a working version

                    Regards
                    Jo
                    Give me a little time, and I'll create a workable Demo that you allow you to enter data directly into the Bookings Table via a Form Interface, and isolate the Calendar functionality from that. Stay tuned...

                    Comment

                    • Jo at Isla
                      New Member
                      • May 2010
                      • 19

                      #11
                      Your a star :-)

                      Comment

                      • ADezii
                        Recognized Expert Expert
                        • Apr 2006
                        • 8834

                        #12
                        Originally posted by Jo at Isla
                        Your a star :-)
                        Here is a little something for you, have fun.
                        P.S. - I am leaving it up to you to write Validation Code to ensure that there are no 'Double Bookings' for a given Room. The combination of Room Number, and the Interval between the Start and Leave Dates for that Room, must be Unique!
                        Attached Files

                        Comment

                        • Jo at Isla
                          New Member
                          • May 2010
                          • 19

                          #13
                          Hi Adezii

                          Thankyou so much for your help in this regard - it is really realy appreciated :-) Are you able to release the program to me so that i can embed it within the rest of the database system that i am building?

                          Warm regards

                          JO

                          Comment

                          • ADezii
                            Recognized Expert Expert
                            • Apr 2006
                            • 8834

                            #14
                            Originally posted by Jo at Isla
                            Hi Adezii

                            Thankyou so much for your help in this regard - it is really realy appreciated :-) Are you able to release the program to me so that i can embed it within the rest of the database system that i am building?

                            Warm regards

                            JO
                            It is yours to do with whatever you like, thanks for asking.

                            Comment

                            • Jo at Isla
                              New Member
                              • May 2010
                              • 19

                              #15
                              Dear ADezii, as i believe someone said to you earlier

                              You are a GENTLEMAN :-) xx

                              Comment

                              Working...