By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

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

P: 19
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.
May 11 '10 #1

✓ answered by ADezii

@Jo at Isla
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!

Share this Question
Share on Google+
30 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
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?
May 11 '10 #2

ADezii
Expert 5K+
P: 8,597
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.
May 11 '10 #3

P: 19
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...
May 11 '10 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
@Jo at Isla
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.
May 11 '10 #5

P: 19
@ADezii
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.
May 11 '10 #6

P: 19
@msquared
thankyou :-)
May 11 '10 #7

ADezii
Expert 5K+
P: 8,597
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 PopulateCalendar() Procedure within frmCalendar.
    Expand|Select|Wrap|Line Numbers
    1. 'code above intentionally omitted
    2.  
    3. strFirstOfMonth = str(intMonth) & "/1/" & str(intYear)
    4.  
    5. '*************************************************************************
    6.   'ADezii
    7.   'NOTE: Will work in the UK (United Kingdom) and other European Nations
    8.   'strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear)
    9. '*************************************************************************
    10.  
    11. 'code below intentionally omitted
  6. Do not modify any other portion of the code unless you know what you are doing.
Attached Files
File Type: zip Book Dates.zip (103.5 KB, 66 views)
May 11 '10 #8

P: 19
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
May 12 '10 #9

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
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...
May 12 '10 #10

P: 19
Your a star :-)
May 12 '10 #11

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
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
File Type: zip Book Dates.zip (101.1 KB, 56 views)
May 12 '10 #12

P: 19
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
May 12 '10 #13

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
It is yours to do with whatever you like, thanks for asking.
May 12 '10 #14

P: 19
Dear ADezii, as i believe someone said to you earlier

You are a GENTLEMAN :-) xx
May 12 '10 #15

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
Thanks, you had me at star in Post #11! (LOL)
May 12 '10 #16

P: 19
Adezii I need you!!!

Is it possible to open an Excel worksheet inside a form? Say within an unbound or bound object - so that i have spreadsheet functionality - not an image...

Have tried all manner of ways - not able to get it to happen :-(

Am holding / trusting that you will know how to do this :-)

Regards

Jo :-)
May 14 '10 #17

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
  1. Open your Form in Design Mode.
  2. Select Unbound Object Frame from the Toolbox.
  3. When the Wizard Opens, select Create from File.
  4. Select the Link Check Box to Link the Spreadsheet or leave it deselected to Embed.
  5. Click the Browse Button.
  6. Navigate to your Excel File.
  7. OK
  8. OK again to close Dialog.
  9. Set the Enabled Property of the Unbound Object Frame to Yes.
  10. Set the Locked Property of the Unbound Object Frame to No.
  11. Save all changes.
  12. Double - Click to Activate the Spreadsheet within the Unbound Object frame of your Form.
  13. Once you do this, you will see Excel's Menu integrate with that of Access, and you can work with the Spreadsheet.
May 14 '10 #18

P: 19
Thankyou ADezii I had come across that particular solution - what i dont like about it though is that it opens Excel and totally takes over the Access form from which it opened. On the plus side i do then have access to different tabs and format/fill facility.

I have experimented with the spreadsheet contol 10 and 11, which would appear to be more of what i am looking for - ie i can remove the row/column header and effect a seamless spreadsheet view that does not compromise the Access form in any way - into which i can then enter data (it does not have to go anywhere ie into Excel) but - it does not allow me the facility to be able to reformat a cell/sequence fill unless i display the toolbar and then go through about 6 key strokes to complete a formatting action.

Are you able to figure out either - how to get a linked excel spreadsheet to contain itself within the unbound object but with tab and format facilities available without going to the source software - or using the spreadsheet control somehow enable the formating/fill command function.

I am spending literally all day(s) going over each of the options available and seeing which one - offers fewest constraints - any help for me at all on this one?
May 16 '10 #19

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
It appears as though you want Spreadsheet functionality without Excel integration. That's a tall order.
May 16 '10 #20

P: 19
Hi Adezzi what can i say - i'm female :-) but fingers crossed i seem to have it sorted !! but bless you for being there for me :-) x
May 16 '10 #21

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
How about sharing your solution with the rest of us?
May 16 '10 #22

P: 19
Hi ADezii

:-) If only it were that bright a solution !! i have merely used the unbound spreadsheet control but put it in a pop up form so that i can view/insert new tabs, and access Access toolbar for formatting etc. My problem had been in that i was not making the unbound object large enough - hence its unwieldy look and supposed lack of facility....

So my friend, nothing at all that you guys dont know already ...

Though i did find out that Access does not like Open Office spreadsheet software....

Warm regards

:-)
May 16 '10 #23

P: 19
@Jo at Isla
Hi ADezii

Long time no speak... i hve now finished the reservation build - it took a fair while owing i feel to the fact that i needed to jog memory so many times rather than just looking at previous build notes (these being in the UK - and me being in Mexico!) plus your very kind assistance, so at long last the small hotel reservation system is finished.

I am writing to ask if you would like to have a copy? then if someone else gets in touch with you who desires something similar, you may feel that it is appropriate to pass it on :-) it is my way of repaying your kindness when i most needed it :-) i.e. to pass it forward....

the only way i know of sending .mdb files is as a zipped compressed file - is there a better way?

One last question if i may! - is there a way for me to make this hotel reservation Access Db like an executable, i.e. so that the hotel owners here dont unwittingly del a query or other etc by mistake!

Warm regards

Jo :-)
Jun 5 '10 #24

P: 19
ps. The hotel owners visit Canada for one month each year - leaving someone in charge of their hotel business in Mexico. They are asking if there is a way that they can gain functional access to their NEW Access Db reservation system whilst they are in Canada....

I have said that i will pass on their query to a guy who will probably know far better than i whether it is possible....

So over to you ADezii :-)

Regards

Jo
:-)
Jun 5 '10 #25

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
I am writing to ask if you would like to have a copy?
I would love a Copy, thank you. You can either send it to my Private E-Mail Address or this Thread, it is up to you.
the only way i know of sending .mdb files is as a zipped compressed file - is there a better way?
No, that is the best way.
is there a way for me to make this hotel reservation Access Db like an executable, i.e. so that the hotel owners here dont unwittingly del a query or other etc by mistake!
There is no need for that. By cleverly hiding certain Objects, disabling the Shift By-Pass, disabling Menus, not allowing access to the DB Window, etc., you can make it very difficult for anyone to inadvertently DELETE or even MODIFY Critical Database Objects. Of course, you will need a Back Door to get in yourself.
The hotel owners visit Canada for one month each year - leaving someone in charge of their hotel business in Mexico. They are asking if there is a way that they can gain functional access to their NEW Access Db reservation system whilst they are in Canada....
I imagine that this could be done by posting the Database within a VPN (Virtual Private Network), but this is beyond my area of expertise.
P.S.- When I get a chance, I'll consult my IT Buddies concerning the VPN approach or possibly a better alternative.
Jun 5 '10 #26

P: 19
@ADezii
Thankyou :-)

Send me your private email and i will zip and send you

Jo
:-)
Jun 5 '10 #27

P: 19
@Jo at Isla
Hi ADezii

Thanks the for send .mdb info.

If you send me an email address I have a copy of the reservation database zipped and ready to send you - just one record of test data in it.

One final problem that i am currently looking at - i have put the database in the public folder of the hotel owner's PC - then set up netsharing on my PC so that i can access her public folder from my PC. However, when i locate and open the db it will only give me read permissions - not read/write.

Are you able to advise me on how to have it so that when accessing it from her public folder, i can also have write permission. ie i need to be able to enter new hotel guests.... Have not done this public bit before!!

Regards

Jo
:-)
Jun 6 '10 #28

P: 19
Hi ADezii

Everything all sorted re public - soooo as soon as you give me an email address i will send you zipped/compressed reservation software. Although gifted to this hotel, I may try and sell (cheaply!) on the island in order to aqcuire some more pesos.... so that i can do a trip or two before i head back to the UK :-)

Regards

Jo
:-)
Jun 7 '10 #29

ADezii
Expert 5K+
P: 8,597
@Jo at Isla
Already sent you my E-Mail Address, days ago.
Jun 7 '10 #30

P: 19
@ADezii
Here you go :-)
Attached Files
File Type: zip Blank Hotel Reservation Software.zip (600.8 KB, 71 views)
Jun 7 '10 #31

Post your reply

Sign in to post your reply or Sign up for a free account.