Runtime Error - Method 'Value' of object...

rede96

Registered User.
Local time
Today, 18:32
Joined
Apr 2, 2004
Messages
134
I have just installed Office 2003 and I am trying to use an old database in Access 2000 file format.

Within the forms are activeX Calender controls. I am now getting a runtime error when I try reference these controls:

Runtime Error - Method 'Value' of object '_CustomControl' failed.

This happens when I am trying to either change the control or get a value from it.

i.e. Me.CalControl = Now() or Me.FrmDate = Me.CalControl

I know that the controls are referenced (Microsoft Access Calender Control 7.0)

Can anyone help please?
 
Code:
Me.CalControl = Now() or Me.FrmDate = Me.CalControl

Should be

Code:
Me.CalControl = Now or Me.FrmDate = Me.CalControl
You don't use the parentheses within code, when there are no arguments, but what is the rest of your code surrounding it. If this is a controlsource then it's syntax would be incorrect. What is it doing and where is it?
 
Hi boblarson,

The code is in the 'Open' event of a form. When it opens the code is meant to set the Calender to today's date.

Me.Cal = now()

Then when the calender is updated I use:

me.frmcontrol = me.cal

This is to update a date control on the form.

I have changed the code to:

Me.Cal = now

I now get a different error:

Automation Error
Exception Occured

:confused: :confused:

I have had problems with ActiveX controls in the past when using different versions of Access. Problem is I can't remember how to get around it. :confused:

Anyway, for now I may just have to use a different method for generating a calender.
 
Have you tried checking the references to make sure that there are none marked as MISSING?
 
Have you tried checking the references to make sure that there are none marked as MISSING

Yes I did that. None were missing but could have been pointing to an updated ocx or dll maybe?

However I remembered the work around. I installed Access 2000 in a seperate Office directory. Open the database and let it run. Then repaired Office 2003 so Access opens this version and not 2000. Now the database/forms works fine.

I don't really understand why but at least it works! :)

Thanks anyway.

Red
 

Users who are viewing this thread

Back
Top Bottom