p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Calender Controls (http://p2p.wrox.com/showthread.php?t=5491)

KennethMungwira October 28th, 2003 11:42 AM

Calender Controls

I have a question in reguard to an Access Database '2002', calender. I have several pieces of items in my department which are reserved on a note pad, and now I would like to have then done on a calender in Access where everyone can see the reservations without looking for the note book which has been lost a couple of times. We have department (X3) Laptops, LCD Projector, etc; so what I would like to do is have form which has the Calendar on it, and then when a date is clicked another form shows the hours in the day 12am to 12pm. Then the user can highlight the hours they want and type in what they have reserved. Thus other users can see what has been checked out, where it is being used and for how long.

Is this possible?

sal October 28th, 2003 11:50 AM

Use Microsoft Outlook for this task.

In Outlool you can make the Laptop a resource and schedule it just as you would schedule another person. When users create a new schedule for the resource, they will be able to see if it is available or not.

This can be done in Access, but I do not see the reason.

Do you have Outlook?


KennethMungwira October 28th, 2003 12:09 PM

We do have outlook, but since it is used company wide, and another department did the what you suggested. Everyone in the company is able to view the equipment, and we would really like to keep the information in-house..

At first we wanted to do the work on(Frontpage 2000) HTML page but we needed an active server. So we now want to do it on Access, but have similiar functionality as 'Outlook'.

Thank you

sal October 28th, 2003 12:37 PM

Access will not show you your dates as a calendar. It can be done, but it takes a lot of coding and an expert coder to get this done.

All you will be able to do in Access without coding is to enter the dated and times on tables and somehow guess your way around. Outlook will show you if the dates/times overlap. Access will not.


KennethMungwira October 28th, 2003 02:32 PM

Do you have the code to enable the dates to be clicked and open a new form? I am having problems with that code......

Thank you

KennethMungwira October 28th, 2003 02:50 PM

the calendar is of per the calender properties:

Class: MSCAL.Calender.7
OLE Class: Calender

sal October 28th, 2003 05:47 PM

That calendar control only works as a date picker control. You can not set it to show multiple valued on it's dates.

You can call the value of the calendar


Is that what you are refering to?


KennethMungwira October 29th, 2003 10:59 AM


Actually, what I wanted to have the functionality to toggle between the calendar and anthoer form. So if I double clicked a date(Square in a month), I could open another form. So that I can view another form, with the calender in the back drop......

Hope you understand in what direction I am moving in here. I would like to take the date of the 'Square' I just double clicked and place it on the form I just opened.

sal October 29th, 2003 11:42 AM

I have done this before.

________ ______
________| |______|
TextBox Button

The textbox is by default locked, the button opens a form that contains the Calendar control. When you select a value from the calendar control you set the textbox to the calendar value. The textbox can be bound to the table/field.

You can then create two additional textboxes for the Begin time and end time. on the same form.

There is not much code.

try this on the close event of the form containing the calendar

Private Sub Form_Close()
Forms![Form1]![Date].Text = Me.Calendar1.Value
End Sub


KennethMungwira October 29th, 2003 12:13 PM

Sorry you lost me!![?]

1 |2 |

ok those are the 1st and 2nd buttons on the calender, how do I get the first to show on a textbox which I have on the same form. Only when I click on one of the dates?

1stOct |
_______| Textbox1 on same form

sal October 29th, 2003 12:40 PM

It is difficult to get the calendar control to automatically update the textbox. The events do not fire as you would like them to fire.
It is easier to put the calendar control on a different form. You could also omit the textbox and use only a bound Calendar control. Bound to the date field you are using.

By binding it and giving it a default value, you automatically update the table.


KennethMungwira October 29th, 2003 04:20 PM

Sorry but I keep on getting an error on the [Date] part of the code!!?

'Forms![Form1]![Date].Text = Me.Calendar0.Value

My textbox on the form is named Textbox1, so what is [Date]?

thank you

sal October 29th, 2003 04:46 PM


Instead of Date put the name of your textbox


I need some coffee...


All times are GMT -4. The time now is 01:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.