Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

“Method Full Path of Object Reference Failed” with Access 2010 + Windows 7 Ultimate

681 views
Skip to first unread message

PW

unread,
Sep 25, 2013, 4:40:47 PM9/25/13
to
Our software application uses the Runtime version of MS Access 2010.
We have our application installed in an office with 3 workstations.
Two with Win7 Ultimate and one with Win7 Professional. The Win7 Pro
pc works just fine. The Win7 ultimate pcs get the error "Method Full
Path of Object Reference Failed". Does anyone have an idea what this
message means or how to resolve it?

-paulw

Patrick Finucane

unread,
Sep 25, 2013, 6:14:08 PM9/25/13
to
Lots or google hits on your issue. One stated "After further review I replaced comctl32.ocx from another working computer and all is well on troubled computer so far". http://windowssecrets.com/forums/showthread.php/152236-Error-Method-FullPath-of-object-Reference-failed

Phil

unread,
Sep 25, 2013, 6:26:45 PM9/25/13
to
Think you are missing some references (probably the paths are different on
the different computers) A quick google will give you information on how to
fix broken reference. I personally use a table to give the paths of the more
unusual reference libraries

RefID ComputerName RefName RefPath Sequence
5 LAPTOP Outlook C:\Program Files\Microsoft Office\Office14\MSOUTL.OLB 2
7 LAPTOP Utilities C:\Documents and Settings\Phil\My Documents\Access\MDB
2010\Utilities.AccDb 1 6 LAPTOP Word C:\Program Files\Microsoft
Office\Office14\MSWORD.OLB 3 24 OFFICE2 Outlook C:\Program Files\Microsoft
Office\Office14\MSOUTL.OLB 2
25 OFFICE2 Utilities C:\Users\Phil\Documents\Access\Mdb2010\Utilities.AccDe 1
23 OFFICE2 Word C:\Program Files\Microsoft Office\Office14\MSWORD.OLB 3
8 OFFICEMESH Outlook C:\Program Files (x86)\Microsoft
Office\Office14\MSOUTL.OLB 2
9 OFFICEMESH Utilities C:\Users\Phil\Documents\Access\MDB
2010\Utilities.AccDe 1 10 OFFICEMESH Word C:\Program Files (x86)\Microsoft
Office\Office14\MSWORD.OLB 3 17 OLDACER Outlook C:\Program Files
(x86)\Microsoft Office\Office14\MSOUTL.OLB 2
18 OLDACER Utilities C:\Users\APL\Documents\Access\MDB 2010\Utilities.AccDe 1
19 OLDACER Word C:\Program Files (x86)\Microsoft Office\Office14\MSWORD.OLB 3
3 PHIL-DESKTOP Outlook E:\Program Files (x86)\Microsoft
Office\Office14\MSOUTL.OLB 2 1 PHIL-DESKTOP Utilities E:\Phil Data\Access\Mdb
2010\Utilities.AccDb 1 4 PHIL-DESKTOP Word E:\Program Files (x86)\Microsoft
Office\Office14\MSWORD.OLB 3 11 SABRE Outlook C:\Program Files\Microsoft
Office\Office14\MSOUTL.OLB 2 12 SABRE Utilities C:\Documents and
Settings\Andrew\Desktop\Phil\MDB 2010\Utilities.AccDb 1
13 SABRE Word C:\Program Files\Microsoft Office\Office14\MSWORD.OLB 3

Phil

Phil

unread,
Sep 25, 2013, 6:31:21 PM9/25/13
to
On 25/09/2013 23:14:03, Patrick Finucane wrote:
> On Wednesday, September 25, 2013 3:40:47 PM UTC-5, PW wrote:
>> Our software application uses the Runtime version of MS Access 2010.
>>
>> We have our application installed in an office with 3 workstations.
>>
>> Two with Win7 Ultimate and one with Win7 Professional. The Win7 Pro
>>
>> pc works just fine. The Win7 ultimate pcs get the error "Method Full
>>
>> Path of Object Reference Failed". Does anyone have an idea what this
>>
>> message means or how to resolve it?
>>
>>
>>
>> -paulw
>
> Lots or google hits on your issue. One stated "After further review I r
> eplaced comctl32.ocx from another working computer and all is well on
> troub led computer so far".
> http://windowssecrets.com/forums/showthread.php/152236-Error-Method-FullPath-of-object-Reference-failed
>
If you are using comctl32.ocx that is a frequent source of trouble and may
not be registered, and there appear a number of versions, some of which are
incompatible with Access 2010 and especially with Access 2010 SP1

Phil

PW

unread,
Sep 25, 2013, 10:57:14 PM9/25/13
to
On Wed, 25 Sep 2013 23:26:45 +0100, "Phil" <ph...@stantonfamily.co.uk>
wrote:
How do you use your table Phil?

Thanks!

-paulw

PW

unread,
Sep 25, 2013, 11:00:48 PM9/25/13
to
So doesn't Windows 7 Ultimate come with various languages? Does
anyone think that there may be something related to that?

Our ACCDE is working fine with Win7 Pro.

-paulw

Phil

unread,
Sep 26, 2013, 3:49:31 AM9/26/13
to

>>Phil
>
>
> How do you use your table Phil?
>
> Thanks!
>
> -paulw
>

Sorry Paul. This is a lot of code and there will probably be some stuff
missing

Basically an AutoExec Macro runs the LoadRefs function on starting Access and
when I close the program via a command button, the UnloadRefs runs

Phil


Option Compare Database
Option Explicit

Private Declare Function apiGetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Function fOSMachineName() As String
'Returns the computername

Dim lngLen As Long, lngX As Long
Dim strCompName As String

lngLen = 16
strCompName = String$(lngLen, 0)
lngX = apiGetComputerName(strCompName, lngLen)
If lngX <> 0 Then
fOSMachineName = Left$(strCompName, lngLen)
Else
fOSMachineName = ""
End If

End Function

Function LoadRefs()
' Run by AutoExec Macro

Dim MyDb As Database
Dim RefsSet As Recordset
Dim SQLStg As String
Dim RefsFixed As Boolean

' Make sure this reference is loaded for this computer
SQLStg = "SELECT Refs.* FROM Refs "
SQLStg LStg = SQLStg & "WHERE ComputerName = '" & fOSMachineName() & "' ORDER
BY Refs.Sequence;" ' This computer name

Set MyDb = CurrentDb
Set RefsSet = MyDb.OpenRecordset(SQLStg)

With RefsSet
Do Until .EOF
RefsFixed = FixUpRefs(!RefName, !RefPath)
.MoveNext
Loop
.Close
Set RefsSet = Nothing
End With
'RefsFixed ixed = FixUpRefs("Menu 2010", "C:\Phil Data\Access\MDB 2010\Menu
2010.AccDe ) End Function

Sub CheckRefName()

Dim MyDb As Database
Dim RefsSet As Recordset
Dim SQLStg As String
Dim Ref As Reference
Dim i As Integer

' Make sure this reference is loaded
SQLStg = "SELECT Refs.* FROM Refs "
SQLStg = SQLStg & "WHERE ComputerName = '" & fOSMachineName() & "';"

Set MyDb = CurrentDb
Set RefsSet = MyDb.OpenRecordset(SQLStg)

' Need to make sure we have the latest version of any library reference
With RefsSet
Do Until .EOF
For i = Access.References.Count To 1 Step -1
Set Ref = Access.References(i)
If Ref.FullPath = !RefPath Then
.Edit
!RefName = Ref.Name
.Update
End If
Set Ref = Nothing
Next i
.MoveNext
Loop
.Close
Set RefsSet = Nothing
End With

End Sub

Function UnLoadRefs()

'If IsItMDE Then Exit Function

Dim MyDb As Database
Dim RefsSet As Recordset
Dim SQLStg As String
Dim Ref As Reference
Dim i As Integer

' Make sure this reference is loaded
SQLStg = "SELECT Refs.* FROM Refs "
SQLStg LStg = SQLStg & "WHERE ComputerName = '" & fOSMachineName() & "' ORDER
BY Refs.Sequence;" ' This computer name

Set MyDb = CurrentDb
Set RefsSet = MyDb.OpenRecordset(SQLStg)

' Need to make sure we have the latest version of any library reference
With RefsSet
Do Until .EOF
For i = 1 To References.Count
If References(i).Name = !RefName Then ' Find the name
Set Ref = References(i)
References.Remove Ref ' Remove it
Set Ref = Nothing
Exit For
End If
Next i
.MoveNext
Loop
.Close
Set RefsSet = Nothing
End With

RunCommand acCmdCompileAndSaveAllModules

End Function

Function FixUpRefs(Optional ExtraRefName$, Optional ExtraRefPath$) As Boolean
' Ensure extra reference is loaded. ExtraRef is the name

If IsItMDE Then Exit Function

Dim Ref As Access.Reference
Dim intCount As Integer
Dim intX As Integer
Dim blnBroke As Boolean
Dim strPath As String

On Error GoTo FixUpRefs_Error

'Count the number of references in the database
intCount = Access.References.Count
'Loop through each reference in the database
'and determine if the reference is broken.
'If it is broken, remove the Reference and add it back.

For intX = intCount To 1 Step -1
Set Ref = Access.References(intX)
With Ref
blnBroke = .IsBroken
If blnBroke = True Or Err <> 0 Then
strPath = .FullPath
With Access.References
.Remove Ref
.AddFromFile strPath
End With
End If
End With
Set Ref = Nothing
Next intX

If ExtraRefPath > "" Then
For intX = intCount To 1 Step -1
Set Ref = Access.References(intX)
If If Ref.Name = ExtraRefName Or Ref.FullPath = ExtraRefPath Then ' Reference
found References.Remove Ref
References.AddFromFile ExtraRefPath
Else
References.AddFromFile ExtraRefPath
End If
Next intX

End If

Set Ref = Nothing

'Call Call SysCmd(504, 16483) hidden SysCmd to automatically compile/save all
modules.

RunCommand acCmdCompileAndSaveAllModules
FixUpRefs = True

Call Call CheckRefName ' Make sure names are loaded to refs table

Exit Function

FixUpRefs_Error:
If Err = 2046 Then ' In AccDe so can't compile
Resume Next
ElseIf Err = 29060 Then ' File not found
If strPath > "" Then
MsgBox Err & " File " & strPath & " not found"
Else
MsgBox Err & " File " & ExtraRefPath & " not found"
End If
ElseIf seIf Err = 32813 Then ' Name conflicts with existing module, project,
or object library Resume Next
Else
MsgBox MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure FixUpRefs of Module ModReferences" End If

End Function

Sub AddRefs()

If IsItMDE Then Exit Sub

On Error Resume Next

'Loop through each reference in the database
'Add all references
'Debug.Print "----------------- Add References -----------------------"
'Word :C:\Program Files (x86)\Microsoft Office\Office14\MSWORD.OLB
'Outlook :C:\Program Files (x86)\Microsoft Office\Office14\MSOUTL.OLB
'MSComctlLib :C:\Windows\SysWow64\MSCOMCTL.OCX
'VBIDE BIDE :C:\Program Files (x86)\Common Files\Microsoft
Shared\VBA\VBA6\VBE6EXT.OLB 'Office :C:\Program Files (x86)\Common
Files\Microsoft Shared\OFFICE14\MSO.DLL 'Menu 2010 :C:\Phil Data\Access\MDB
2010\Menu 2010.accdb 'DAO :C:\Program Files (x86)\Common Files\Microsoft
Shared\OFFICE14\ACEDAO.DLL 'stdole :C:\Windows\SysWOW64\stdole2.tlb
'Access :C:\Program Files (x86)\Microsoft Office\Office14\MSACC.OLB
'VBA :C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
' Standard References - Others fount in table Refts for this database
' ****** ORDER IS IMPORTANT ******* '
With Access.References
AddFromFile FromFile " C:\Program Files (x86)\Common Files\microsoft
shared\VBA\VBA7\VBE7.DLL" .AddFromFile " C:\Program Files (x86)\Microsoft
Office\Office14\MSACC.OLB" .AddFromFile " C:\Windows\SysWOW64\stdole2.tlb"
AddFromFile FromFile " C:\Program Files (x86)\Common Files\Microsoft
Shared\OFFICE14\ACEDAO.DLL" .AddFromFile " C:\Program Files (x86)\Common
Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB" .AddFromFile " C:\Program Files
(x86)\Common Files\Microsoft Shared\OFFICE14\MSO.DLL" End With

' Call a hidden SysCmd to automatically compile/save all modules.
'Call SysCmd(504, 16483)
'RunCommand mand acCmdCompileAndSaveAllModules ' May fail, but so what

End Sub

PW

unread,
Oct 22, 2013, 9:46:55 PM10/22/13
to
The working PC doesn't even have comctl32.ocx installed.

-paulw

Patrick Finucane

unread,
Oct 22, 2013, 10:39:20 PM10/22/13
to
I recommend you search Google for your error message, like I did, and start reading what others experienced and solved or didn't.

Phil

unread,
Oct 23, 2013, 4:06:13 AM10/23/13
to
I still think your problem is with a broken library reference

Try this

Function ReferenceInfo()

Dim Msg As String
Dim refItem As Reference

On Error GoTo ReferenceInfo_Err

For Each refItem In References
If refItem.IsBroken Then
Msg = "Missing Reference:" & vbCrLf & refItem.FullPath
Else
Msg = "Reference: " & refItem.Name & vbCrLf _
& "Location: " & refItem.FullPath & vbCrLf
End If
MsgBox Msg
Next refItem

Exit Function

ReferenceInfo_Err:
If If Err = -2147319779 Then ' Method Full Path of Object Reference Failed
Msg = "Reference: " & refItem.Name & vbCrLf & "Location: NOT FOUND"
Else
Msg = Err & " " & Err.Description
End If
Resume Next

End Function

You obviously will have to run it from a control button on a form in your
runtime enviromments

Phil

PW

unread,
Oct 23, 2013, 11:56:56 AM10/23/13
to
On Tue, 22 Oct 2013 19:39:20 -0700 (PDT), Patrick Finucane
I spent a few hours doing that yesterday. Thanks.

-paulw

PW

unread,
Oct 23, 2013, 12:59:59 PM10/23/13
to
On Wed, 23 Oct 2013 09:06:13 +0100, "Phil" <ph...@stantonfamily.co.uk>
wrote:
Very cool Phil!

The client gets the "Method Full Path" error after ACEDOA.DLL succeded
and it refers to MSOUTL.OLB.

The problem is only happening with their Windows 7 Ultimate PCs that
have Outlook 2007 installed.

So I am guessing I need to figure out how to add a reference to
Outlook 2007 but I don't have that installed on my PC. I am using
Outlook 2010.

So I think you are spot on about the reference! It's just not
available on my PC.

-paulw


PW

unread,
Oct 23, 2013, 1:14:45 PM10/23/13
to
On Tue, 22 Oct 2013 19:39:20 -0700 (PDT), Patrick Finucane
I think I found something here:
http://www.access-programmers.co.uk/forums/showthread.php?t=199603

Maybe if I get MSOUTL.OLB from a PC with Outlook 2007 installed that I
can reference in Access 2010 would be a fix. But I think I need to
learn how to use Late Binding.

Thanks!

-paul

Phil

unread,
Oct 24, 2013, 3:23:25 AM10/24/13
to
> Well at least in confirms my suspicion

Have a look at http://support.microsoft.com/kb/245115.
Although I rarely use late binding myself, it's no big deal.
The main problem is that if the library has been referenced, intellisence
doesn't work, so you have to be more careful about your coding.

Phil

Tony Toews

unread,
Oct 28, 2013, 1:39:36 AM10/28/13
to
On Wed, 23 Oct 2013 10:59:59 -0600, PW
<emailad...@ifIremember.com> wrote:

>The problem is only happening with their Windows 7 Ultimate PCs that
>have Outlook 2007 installed.
>
>So I am guessing I need to figure out how to add a reference to
>Outlook 2007 but I don't have that installed on my PC. I am using
>Outlook 2010.

Yup, as Phil states use Late Binding.

For more information including additional text and some detailed links
see the "Late Binding in Microsoft Access" page at
http://www.granite.ab.ca/access/latebinding.htm

Tony
0 new messages