I just installed Office 2003...

M

Manuel

Hi,

I’ve just installed Access 2003 at home - the install was successful and I'm
able to open Access without issue. The problem is that when I open a
database that I created at work (database was created using Access 2003), I
receive several messages.

1st - I have a form which uses the Microsoft Office Date Picker Active X
control. When I open the form at home I receive the following message:

Your database or project contains a missing or broken reference to the file
'MSCOMCT2.OCX' version 2.0.

When I open References... I see that there is a missing reference for
Microsoft Windows Common Controls-2 6.0 (SP4). And the location of the
'MSCOMCT2.OCX' file is C:\WINNNT\System32\MSCOMCT2.OCX, however, I cannot
find this file in the above directory. Can I download this file from
somewhere?

2nd - on the OnOpen event of a form I have a macro which runs the SetValue
command to assign a value to a label. When I open this form the Action
Failed box appears, and when I click Halt I receive the following error
message:

Run-time error '2770':
The object you reference in the Visual Basic procedure as an OLE object
isn't an OLE object.

Any idea's on how to go about addressing these two issues? The 2nd issue I
find more disconcerting then the 1st.

Thanks,
Manuel
 
D

Douglas J. Steele

PS: Actually, it's possible that removing the missing reference in 1 might
fix 2.
 
M

Manuel

Solved the 1st issue - still have no clue on the 2nd (resolving the missing
reference didn't help the 2nd issue).

Any suggestions?
 
D

Douglas J. Steele

Did you check that you're setting the label's Caption property, as I
suggested in my other post?

Post the actual VBA code that's failing.
 
M

Manuel

On the Got Focus Event of the Employee Name Combo Box I have the following:

Private Sub cboEmpName_GotFocus()
DoCmd.RunMacro "mcrSetValue.lblEmpName"
Me.cboEmpName.Requery
End Sub

The Macro is as follows:

Macro Name: lblEmpName
Action: SetValue
Item: [Forms]![frm_Employees]![frm_EmpTraining]![lblAddInfo].[Caption]
Expression: "Select an Employee from the drop down menu."

What's strange is, like I mentioned above, I only have this issue when I
take the database home; at work it works just fine.

I really appreciate your help!
 
D

Douglas J. Steele

That shouldn't work ever. Assuming that frm_EmpTraining is the name of a
subform control on form frm_Employees, that should be

[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption]

However, why bother using a macro?

Private Sub cboEmpName_GotFocus()
[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption] = _
"Select an Employee from the drop down menu."
Me.cboEmpName.Requery
End Sub

If you need to be able to do this from multiple points in your application,
create a sub (in a module, not a class or code-behind-form) that does it:

Sub ChangeCaption()
[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption] = _
"Select an Employee from the drop down menu."
End Sub

and then change your GotFocus event to

Private Sub cboEmpName_GotFocus()
Call ChangeCaption
Me.cboEmpName.Requery
End Sub


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Manuel said:
On the Got Focus Event of the Employee Name Combo Box I have the
following:

Private Sub cboEmpName_GotFocus()
DoCmd.RunMacro "mcrSetValue.lblEmpName"
Me.cboEmpName.Requery
End Sub

The Macro is as follows:

Macro Name: lblEmpName
Action: SetValue
Item: [Forms]![frm_Employees]![frm_EmpTraining]![lblAddInfo].[Caption]
Expression: "Select an Employee from the drop down menu."

What's strange is, like I mentioned above, I only have this issue when I
take the database home; at work it works just fine.

I really appreciate your help!

Douglas J. Steele said:
Did you check that you're setting the label's Caption property, as I
suggested in my other post?

Post the actual VBA code that's failing.
 
M

Manuel

I used Me.frm_EmpTraining!lblAddInfo.Caption = "Select an Employee from the
drop down menu." and that appears to have worked.

Thanks a million for your help with both of my issues - I REALLY appreciate
it!!

Douglas J. Steele said:
That shouldn't work ever. Assuming that frm_EmpTraining is the name of a
subform control on form frm_Employees, that should be

[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption]

However, why bother using a macro?

Private Sub cboEmpName_GotFocus()
[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption] = _
"Select an Employee from the drop down menu."
Me.cboEmpName.Requery
End Sub

If you need to be able to do this from multiple points in your application,
create a sub (in a module, not a class or code-behind-form) that does it:

Sub ChangeCaption()
[Forms]![frm_Employees]![frm_EmpTraining].Form![lblAddInfo].[Caption] = _
"Select an Employee from the drop down menu."
End Sub

and then change your GotFocus event to

Private Sub cboEmpName_GotFocus()
Call ChangeCaption
Me.cboEmpName.Requery
End Sub


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Manuel said:
On the Got Focus Event of the Employee Name Combo Box I have the
following:

Private Sub cboEmpName_GotFocus()
DoCmd.RunMacro "mcrSetValue.lblEmpName"
Me.cboEmpName.Requery
End Sub

The Macro is as follows:

Macro Name: lblEmpName
Action: SetValue
Item: [Forms]![frm_Employees]![frm_EmpTraining]![lblAddInfo].[Caption]
Expression: "Select an Employee from the drop down menu."

What's strange is, like I mentioned above, I only have this issue when I
take the database home; at work it works just fine.

I really appreciate your help!

Douglas J. Steele said:
Did you check that you're setting the label's Caption property, as I
suggested in my other post?

Post the actual VBA code that's failing.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Solved the 1st issue - still have no clue on the 2nd (resolving the
missing
reference didn't help the 2nd issue).

Any suggestions?

:

Uncheck it.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


How do I go about removing the missing reference??

:

PS: Actually, it's possible that removing the missing reference in
1
might
fix 2.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Hi,

I've just installed Access 2003 at home - the install was
successful
and
I'm
able to open Access without issue. The problem is that when I
open
a
database that I created at work (database was created using
Access
2003),
I
receive several messages.

1st - I have a form which uses the Microsoft Office Date Picker
Active
X
control. When I open the form at home I receive the following
message:

Your database or project contains a missing or broken reference
to
the
file
'MSCOMCT2.OCX' version 2.0.

When I open References... I see that there is a missing
reference
for
Microsoft Windows Common Controls-2 6.0 (SP4). And the location
of
the
'MSCOMCT2.OCX' file is C:\WINNNT\System32\MSCOMCT2.OCX, however,
I
cannot
find this file in the above directory. Can I download this file
from
somewhere?

2nd - on the OnOpen event of a form I have a macro which runs the
SetValue
command to assign a value to a label. When I open this form the
Action
Failed box appears, and when I click Halt I receive the following
error
message:

Run-time error '2770':
The object you reference in the Visual Basic procedure as an OLE
object
isn't an OLE object.

Any idea's on how to go about addressing these two issues? The
2nd
issue
I
find more disconcerting then the 1st.

Thanks,
Manuel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top