| |
| |
|
Microsoft Access Calendar Seminar
Use Access
to Create Monthly Calendars |
| |
|
If
you've ever wanted to print monthly calendars from
your Access databases, then this seminar is perfect for you.
This seminar covers creating an
appointment database in Microsoft Access. You will create a
form that looks like an actual monthly calendar, that you can review
your appointments on. Then, when you're ready to print, just pick a
month, and the report is generated.
Click here for a video showing what's covered in this
seminar:

Click
to Play

|
| |
|
Seminars
-
Access
Calendars |
|
Description: |
Create monthly calendar forms and reports
completely within Microsoft Access |
|
Versions: |
I will
use Access 2007,
however the lessons are valid for all versions of Access back to
AC2000. I will show any differences between 2007 and 2003. |
|
Pre-Requisites: |
Access 101 - 104 a must
Access 201 - 207 highly
recommended Access 301 -
313 very helpful |
|
Running Time: |
1 hour, 56
minutes (1:56) |
|
Cost: |
$39.99 |
|
|
|
This
seminar has two main goals. You will learn how to:
1.
Build a calendar form to edit appointments
2.
Create a printable monthly calendar report
You will begin
by creating a basic table
to store our appointment data. We'll also make a simple form to edit and
add new records.

Next we'll build an
appointment list form, where we can see all of our
appointments. Double-click on an appointment to open and edit it. We'll
also make a checkbox to allow us to see open vs. closed appointments
(close it when you're done with it). You'll also learn about
triple-state checkboxes where you can see open, closed, and ALL
records.

In the next lessons we'll build a form to pick a date using a built-in
Microsoft Access ActiveX Calendar control. Using this
date, we'll generate our own form that looks like a full-sized monthly
calendar, complete with all of our appointments on it.

One of the things we're going to learn how to do is make the first day
on our calendar form figure out what the first Sunday
on or before the start of the month is, then build the rest of the
calendar accordingly, greying out any days that are before or after the
selected month. We'll tackle that with a little bit of VBA programming.

Of course, you'll be able to double-click on any
appointment on the calendar to open up a popup form to edit that
appointment.

Then, once the form is completed, we'll create the printable
monthly calendar report. We'll actually make two versions -
I'll show you how to lay it out portrait and landscape.


This
seminar is perfect for anyone who wants to do any kind of
scheduling in Microsoft Access. You can store your appointments, edit
them easily, and print out professional-looking monthly calendar reports
- all from within Access.
This
seminar is long (almost two hours) but it's broken up into
easily managed lessons of about 10 minutes each. You can sit down,
watch a lesson, review the material, test the code out yourself, and
experiment. Do a little bit each day. It's long, but it's comprehensive
- you won't miss a single step as I've recorded everything from
start to finish.
All
of the sample database files are available on my Web site
(instructions on where to download them are in the course videos). They
are available in Access 2007 and 2000 formats.
This
seminar is available to view online in the Amicron Theater.
You can
click here to watch the first two lessons absolutely free.
NEW: If you would
like to download a copy of the database we build in this class so you
can look it over and see if it will meet your needs, then
CLICK HERE
to download it. This sample database is available for
Access 2007 only, even though we do cover Access 2000 and 2003 in the
class.
Of
course, if you have any questions about whether or not this seminar is
for you, please contact me.

Access Calendar Seminar Outline
00. Intro (7:35) Topics Covered Pre-Requisites
01. Create Database (7:02) Turn on Overlapping Windows
Create Database File Create Calendar Table Create Calendar Form
02. Appointment List 1 (13:56) Form to List Appointments
ApptListF Double-Click to Open Appt OnDblClick Event Show Closed Items
Checkbox
03. Appointment List 2 (7:54) Triple State
Checkbox Show Closed, Open, All Appts Create Dynamic SQL Rowsource
Refresh Button List.Requery Change Form Caption in VBA
04.
Monthly View Form 1 (11:39) CalendarQ With Short Time DatePickerF
Enter a Date Start Monthly Form
05. Monthly View Form 2
(10:23) Day 2 of our Calendar Form Text Boxes to Show Dates
Make 7 Boxes for the Week
06. Monthly View Form 3 (11:30)
Calendar Control Calculate First Day of Month First Sunday on or Before
1st
07. Monthly View Form 4 (10:51) Grey Out Days of
Diff Months Forms!Form("FieldName") Notation &HFFFFFF Color Notation
08. Monthly View Form 5 (10:26) Shrink Text Get Rid
of Horizontal Scrollbars DblClick Event to Open Appointments Use Excel to
Generate VBA Code
09. Calendar Report 1 (9:40) Design
Printable Monthly Report
10. Calendar Report 2 (12:14)
VBA Code Rewrite for Reports Using the Detail Build Event
11.
Review (3:39)

|
| |
| |
|
 |
Huge Discounts Available
When you purchase multiple classes together
Huge savings up to 50% off! Order Now. |
|
| |
Student Interaction:
Access Calendar Seminar
|
Richard on 1/1/2009:
Manage your appointments, and create printable monthly reports from your Access databases. |
|
Andy on 9/18/2009: At approx 10:48 in Access Calendar session 4, where your adding he DateTime< StartDate+1, when i save i rec'v the error "The expression is typed incorrectly, or it is too complex to be evaluated..." my SQL looks like this:
SELECT CalendarID, ApptTime, Description FROM CalendarQ WHERE DateTime>=Forms!DatePickerF!StartDate AND DateTime |
|
andy on 9/18/2009: after my earlier comment, i did get this to work 2 different ways, one was to add a 2nd "EndDate" to DatePickerF that had an event on update from StartDate that used SQL to adddate("d",1,StartDate) into Enddate. then changed the SQL in MonthlyCalanderF to include AND =Forms!DatePickerF!StartDate AND DateTime<=dateadd("d",1,Forms!DatePickerF!StartDate) ORDER BY ApptTime;
i don't know why i can't just +1 to a date. but this was on two different computers, two different versions of access. |
|
Richard Rost on 9/18/2009: Andy, you didn't type the whole thing in. It should be:
SELECT CalendarID, ApptTime, Description FROM CalendarQ WHERE DateTime>=Forms!DatePickerF!StartDate AND DateTime |
|
Richard Rost on 9/18/2009: That's very strange. I also used two computers as well, and two different versions of Access (2007 and 2003). I had no problems with this at all. If anyone else has the same issue, please let me know. Earlier it looked like you just didn't type in the full SQL statement. |
|
David Leech on 9/19/2009: Hi
First of all excelent tutorial, really easy to understand and fun to watch.
With regard to changing the caption of the form (about 7.20), I was wondering how one might change a larger heading in the form of a label. I ask because I know alot of users dont particularly notice the captions.
I usually like to put a good sized heading on all forms just so its easy to see what they're all about. Just curious.
Thanks.
once again I must compliment you on your videos theyre the best i've come across. very good work.
Look forward to more Thanks.
David |
|
Richard Rost on 9/19/2009: David, thanks for the compliment. If you want to make the message more noticeable, just drop a big old label on the top of the form (or anywhere) and say:
MyLabel.caption = "HEY! CHECK THIS OUT!"
MyLabel.BackColor = vbRed
Or whatever. You can even hide and unhide it with:
MyLabel.visible = TRUE 'or FALSE
If you really want to get crazy, you can make it FLASH with a little Timer event. Just set your TIMER INTERVAL property for the form to 1000 (for one second) and then in the TIMER EVENT for the form, say:
If MyLabel.visible = TRUE then
MyLabel.Visible = FALSE
else
MyLabel.Visible = TRUE
end if
Now sit back and watch your label start flashing. I love this trick.
Hope that answers your question. :) |
|
David Leech on 9/19/2009: Thanks for the quick reply in regard to changing labels on the triple click checkbox.
What I've done (Which I think is pretty cool)
is to have 3 labels and enter the code:
If ShowClosedItems = True Then
ApptListBox.RowSource = "SELECT CalendarID, DateTime, Description FROM CalendarT WHERE Closed=True ORDER BY DateTime;"
ClosedItems.Visible = True
openitems.Visible = False
AllItems.Visible = False
ElseIf ShowClosedItems = False Then
ApptListBox.RowSource = "SELECT CalendarID, DateTime, Description FROM CalendarT WHERE Closed=False ORDER BY DateTime;"
ClosedItems.Visible = False
openitems.Visible = True
AllItems.Visible = False
Else
ApptListBox.RowSource = "SELECT CalendarID, DateTime, Description FROM CalendarT ORDER BY DateTime;"
ClosedItems.Visible = False
openitems.Visible = False
AllItems.Visible = True
End If
I think its a little easier for users to see whats going on. I dont know if anyone else might find that helpful.
Thanks for the idea :) |
|
David Leech on 9/20/2009: If you were to theoretically wanting to set the "date" field of the current date to another color. say if the date is the 2nd of sept then when you open the calendar the current date is shown in say red where as all others stay the same. I ask because people often want to be able to see the current date easily
Thanks |
|
David Leech on 9/20/2009: Hi,
I've completed all of the forms etc both in a blank database aswell as integrated in a project i'm working on.
As I understand it, the canceled appointments remain in the calendar. How would one go about making the text for these apointments red (therefore showing that the appointment is a canceled one). Also within an application I am building there are two appointment types (maintenance and open house) how would I go about making text either say green or blue to show the two different types of appointment.
If any of these things are covered in other videos of yours let me know.
Thanks for the video though its added alot of functionality to my application(s) |
|
Richard Rost on 9/20/2009: David, excellent code. |
|
Richard Rost on 9/20/2009: David, very good question. I didn't think to do this in the video. It would just be a simple matter of checking to see if the current date textbox is equal to today's date. In your FOR loop that goes through the days on the calendar to colorize it, add this:
If Forms!MonthlyCalendarF(S1)=Date() Then
Forms!MonthlyCalendarF(S2).BackColor = vbRed
End if
Put this right before or after the other IF/THEN clause that colorizes the days from other months. |
|
Richard Rost on 9/21/2009: David, you cannot change the text of a single record in a LIST BOX the whole box has to be the same color. The only way to do this would be with using a SUBREPORT instead of a list box. It requires a lot more work, but it can be done. When I get some time, I'll try to add this as another lesson to the seminar. Is anyone else interested in seeing this? |
|
David Leech on 9/23/2009: Lol consider that a brain fart on my part, I was aware that you can not change the color of just one item in a list box. It completely escaped my mind that the list box is what we were using here. I'm actually going through alot of your older lessons to polish my skills a little bit I'm sure i'll get some ideas from there to add a few tricks to my project. I must say this is the easiest and most fun callendar tutorial i've found. I've added this to a current project and it works a treat. Cheers :) |
|
Richard Rost on 9/23/2009: Thanks, David. There are third-party listbox controls you can purchase that DO offer that functionality, but I try to stay away from those in my classes. Like I said, you COULD get colors with a subreport, it would just involve a lot more work. |
|
Cathy on 10/21/2009: The date picker doesn't seem to be commuticating with the active x calendar on the DatePickerF form. The 'set first day of month did not show 10/1/2009 in datepicker and cannot find the 1st sunday. What am I doing wrong? This is the 3rd Calendar database that I have started from scratch. |
|
Richard Rost on 10/21/2009: Cathy, what version of Access are you using? |
|
Cathy on 10/21/2009: Access 2007. I continued with some more of the vba code and I got DatePicker to find the 1st Sunday before 10/1 - but if I exit out of MonthlyCalendarF and DatePicker, select DatePicker again and enter 8/30/2009 MonthlyCalendarF stays the same with 9/27/2009. |
|
Kim Boren on 10/22/2009: Your mention of making us pay our dues is so true. I messed up doing the rowsource code. I had to go back through the whole calendar to verify that I had done the rest of it correct. I did learn more than if I had copied it from your website. |
|
Richard Rost on 10/22/2009: RE: Paying Your Dues... it's so true. When I was first learning how to program in C (a long, long time ago) I used to just copy and paste source code from the sample CDs they include with books. Didn't learn a thing. Then, I started typing in the code from the book itself... that extra little step is so crucial. Don't JUST copy the code though, EXAMINE it as you're typing it. Try to figure out WHAT is going on, and WHY. |
|
Alan Hill on 10/28/2009: I have just got back from a three weeks holiday in Thailand. I needed to unwind a bit so I have just run through your Calendar Seminar. I loved it. The use of Excel to generate code was fantastic. Lots of tricks and tips and really helpful code snippits.
You really know your stuff. Thankyou.
Regards Alan Hill |
|
rae davis-craig on 1/16/2010: Hi Richard,
Great seminar! I am trying to build a vacation calander to manage employee vacations. How do you incorporate an enddate on the input form where the calander will look different for a range of dates where there are vacations? For example, if an employee is on vacation for a week, I want to put in the start date and end date so that I see the same employee on the calander for the five days and those days are red or whatever. Can you help me with that or tell me if that is covered in any of your training? |
|
Richard Rost on 1/16/2010: Rae, I'm not sure I understand your question. Could you give me some more details, please? |
|
rae davis-craig on 1/16/2010: Thanks Richard for attempting to help me with this. I am trying to builed a calander for managers to manage employee vacation time. So instead of using DateTime category, I would like to use StartDate and EndDate so that the manager can use the CalendarF form to input the StartDate and EndDate for each employee's planned vacation. After doing so I would like the calendar to use the start date and end date information and put the employee's name in for those dates on the calendar. For example if employee X has vacation from 1/18/10 through 1/22/10, I want the calendar to display the employee's name on the calendar on 1/18, 1/19, 1/20, 1/21, & 1/22. In addition, I want to make it look different than any other dates, so that when the calendar is printed the mangager can quickly see the weeks employees are on vacation versus weeks when there are no vacations. I hope you can help me with this. To sum it up I need to know how to incorporate an end date into what you have taught us, how to make the calendar represent a range of dates (example from x to x) and how to make those dates appear different from dates where there are no vacations. |
|
Richard Rost on 1/23/2010: Rae, these are very good ideas. It's a lot more than I can answer here quickly, so I will try to include these in a follow-up video lesson soon. If you don't see anything from me in a couple of weeks, remind me again! :) |
|
Richard Rost on 2/24/2010: UPDATE: If you want to SET the date of the Calendar Control Object, here's some code you can use. This will set the Calendar to the current date:
Calendar.Year = Year(Date)
Calendar.Month = Month(Date)
Calendar.Day = Day(Date)
If you want it to show the current date when you first open the form, put that code in the FORM_LOAD event. It will NOT work in the FORM_OPEN event.
|
|
|
| |
| |
|
You may want to read these articles from the 599CD Blog: |
|
| |
|
 |
| |
| Do you have
questions about
Word, Excel, Access, Web Design, or computers in general? Just
ask us anything you'd like.
Click here
for assistance. |
|
|
|
|
|
| |
|

CLICK HERE for a FREE
lesson |

Order
your first 599CD course now.
Your Satisfaction is Guaranteed!
|
|
|
|
|
|
|
|
|
|