Sure, it can be done, though it depends how well you know VBA / Access etc to whether you want to attempt it or not, becasue it can be done quite easily, though he more you get into it, the more coding it takes to control the process fully.
This is one way to do it, which is fairly simple and not too time consuming, though it is not a perfect solution.
1. Create a Table which has dates and activities, activity types, names, times, people etc etc (whatever you want in your calender entry.
2. Create a form and place the ActiveX Calendar Control onto it from Insert / ActiveX control on the menus. Rename this to something meaningful for ease of reference later - e.g: calMyCalender.
3. Now add the table to the record source and design your form so that the entries appear in continuous forms.. HINT: if I were you I would use a subform here.. that way it will look a lot better and you will be able to add more functionality later..
4. Now you need to use VB to add code behind the Calendar object which filters your subform using the date used within the calendar.
5. Adding an entry: a)Now add a button on your form which opens a new form to be populated by the user which creates an entry in the table and refreshes the original form.
OR b) allow the user to add directly into the subform.
The result is a basic calendar type form which shows you the days entries for the day selected in the calendar control. Of course, if there are no entries then the calendar won't show anything but a new record entry.. which you can disable if you want.. it's up to you.
If you want to add more functionality, you can switch the subform with a different subform at runtime if the user selects to see, for example, a week instead of a day this could then show a different styled form, OR you could simply change the filter to add 7 days to the selected date and use a range..
There are many ways to do this in this one example alone.. it depends on your requirements.. I have put an example bit of basic code below for assigning the dates etc..
'set calendar controls date.. (possibly when you open the form)
Code:
me.calMyCalendar.Value = Date
'or to get the value and set the subform, something in the order of:
Code:
Forms![frmMaster].sfmChild.form.filter = "[dteMyEntryDate]=#" & me.calMycalendar.value & "#"
'or you could issue SQL statements etc:
Code:
strSQL = _
"SELECT * FROM tblCalendarEntries " & _
"WHERE (((dteMyDateEntry)=#" & me.calMyCalendar.value & "#));"
'and then set as the subforms recordsource:
Code:
Forms![frmMaster].sfmChild.form.recordsource = strSQL
But please remember that this is only a basic setup to get you started, if you are looking to this to compliment a current application then the above is probably useful, however, if the sole purpose is to act as a calendar, then I would have to agree with Jason.. Outlook does it so much better !
Either way, best of luck.
Damian
damber@damber.net
A smile is worth a thousand kind words. So smile, it's easy! 