Education is the most powerful weapon
which you can use to change the world.
-Nelson Mandela
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 

News      User Comments     History     Notify Me

4/4/2011 5:25:04 PM
Date Picker and Calendar Seminar
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

 
A few people have emailed me recently to say that they get an error message with Access 2010 when they load up the sample database file for the Access Calendar Seminar:

"Your Microsoft Access database or project contains a missing or broken reference to the File MSCAL.OCX version 7.0. To ensure that your database or project works properly, you must fix this reference."

The file, MSCAL.OCX, is a control object that you can embed into your forms to allow someone to pick a date from a mini calendar. It was necessary in Access 2003 and before. Access 2007 and 2010 don't really need it because you can create a date field and when you click on it you get an automatic date picker control. It's now BUILT IN to Access 2007 and 2010. So, Microsoft stopped shipping MSCAL.OCX with Access 2010.

We've been talking about this in the STUDENT FORUM for the Access Calendar Seminar class, but in case you missed it, here's a summary of those discussions:

Microsoft listed the Calendar OCX Control as one of the things that were removed from Access 2010. So if you're using 2010, you'll get an error message when you first open the sample class database.

The GOOD news, however, is that YOU DON'T NEED IT. The only reason I used the OCX control in class was to give Access 2003 (and earlier) users a form to pick a date with. Now, Access 2007 and 2010 come with a Date Picker automatically built in. Just click on ANY date field, and you can pick a date. So, Access 2010 users, just ignore the lesson where I build the Date Picker form.

From Microsoft's Web Site:

"The Microsoft Calendar control (mscal.ocx) is not available in Access 2010. An alternative is to use the date picker control in Access 2010. Opening an application from an earlier version of Access where the control was used will generate an error message in Access 2010 and the control will not appear."

Apparently, Microsoft isn't shipping the good old Calendar Control with Access 2010. That control has been around since Access 2.0, and I'm sad to see it go. However, there are several different things you can do in Access 2010 to show a calendar... and most of these are built right into Access (no longer a separate control).

Here is a link to MSDN that discusses some alternatives for the calendar control.

I plan on addressing this in more detail in a forthcoming lesson that I will add on to the Calendar Seminar. I'll show Access 2010 users specifically what you can do to create a similar look and feel to the old calendar control.

In the mean time, if you want to use my sample database from class without that error message coming up, just remove the reference to MSCAL.OCX.

Open the database. Ignore any warning or error messages. Go into design view of the Date Picker form. Go to the Form Design Tools > Design tab. In the TOOLS group, click on View Code. That will bring up the Visual Basic Editor.

Click on Tools > References. Uncheck the box next to Microsoft Calendar Control. Click OK.

Now save your database. The Calendar Control reference is now gone. You won't be able to use the Date Picker form, but like I said before, you don't really need it.

You can create date pickers from standard text boxes that are date fields. If your text box is BOUND to a date/time field, you should automatically get a date picker (little calendar box) when you click on the field. If you have an UNBOUND field, just set the format of the box to Short Date (or any other valid date type), save and reopen the form and you should also see the Date Picker box.

See how easy?

UPDATE: I have released a custom replacement for the DATE PICKER.

Permanent Link
Keywords: mscal.ocx calendar control missing
Post Reply

Date Picker and Calendar Seminar Comment from Richard Duckworth @ 9/13/2011
Richard to the rescue...thank you for including the detail on where to find the item to uncheck. I was thrilled to see your website included when I googled the error I was getting when upgrading to Office 2010. Microsoft web page was very confusing.

A very pleased customer of yours as I have purchased several of your lessons.
Show Just This Thread        Post Reply

Add Your Comments or Subscribe
 
If you just want to subscribe to get email updates when the News is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
 
  Your Name:  Required
  Your Email:  NOT Public
  Subject:
  Comments:

 

Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 4+8:
  
  Notify me when the News is updated.
  Remember Me for my next comments
  
 
 
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard

 

 
 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP