Link to home
Start Free TrialLog in
Avatar of Sailo100
Sailo100

asked on

No Object in this control Access Microsoft Control

Hi

I have an access 2003 database (service pack 2) with which i am trying to create a calender on a form using the "microsoft date and time picker control 6.0 (SP4)". As long as i only open the form that has the calender on my computer there is no problem.

But as soon as i open the form on another computer, i loose the control for the calender.
I installed service pack 2 on this pc. Which then resulted in an error message informing me that there was a missing reference for "miscrosoft windows common controls-2.6.0 (SP4)", file "mscomct2.ocx" was missing from "c:\windows\system32\". So i copied the file over from another computer but now i am getting the error message "there is not object in this control" whenever i try to open the form with the calender on it.

Once doing this if i try to open the form on my original computer the control is no longer there, just an empty textbox.
Any ideas why this is happening?

Once i have completed this database it is going to need to be run off multiple people's computers.
Is there any way of coding this problem into a module so i can aviod going to each computer to fix this??

Thanks in advance.

Salio100
Avatar of rockiroads
rockiroads
Flag of United States of America image

This other PC, does it like run win2k? references may be broke
failing that, that ocx was not installed

u cant just copy an ocx, u have to register it as well - use something like regsvr32

e.g

regsvr32 c:\windows\system32\mscomct2.ocx

Avatar of Sailo100
Sailo100

ASKER

Hi

I have registered the ocx as you suggested but i still dont get the "microsoft date and time picker control 6.0 (SP4)" in the "more controls" toolbox, when trying to create the calender.

Both computers run microsoft xp pro.
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In addition - the Calendar control is very prone to versioning troubles, and since you're deploying this to others you'd be well advised to get away from that control (and the File Open/Save dialog as well). There are many alternatives, from using a form with all native Access controls to using API calls to generate your calendar. Tony Toews has collected some of the best here:

http://www.granite.ab.ca/access/calendars.htm
Hi

Sorry in the delay in accepting correct answer and closing the question ...

Thanks everyone for your input, rockiroads i found the control using Insert.
LSMConsulting didnt know that access controls were prone to problem, will be looking into it moving away from them

Sailo100