UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Microsoft Office 15.0 Object Library Problem, Access 2010    
 
   
accesshawaii
post Jan 30 2015, 07:25 AM
Post#1


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


We have a master copy of an Access 2010 database on a network that is automatically downloaded to the user's machine whenever a change is made. On the master version, there is a reference to the Microsoft Office 15.0 Object Library. This works with all the user's machines except for one. There is one person who does not have the 15.0 library, they have the 14.0, so everytime they download a new copy, they get a missing reference error.

This is easy enough to fix manually, you just go in and change the reference to 14.0 but we do regular updates, so having to constantly going to their machine and making the fix is not an option.

I've googled and googled trying to find something on how to resolve this but to no avail. Any assistance would be appreciated.

P.S. I was thinking about just copying the dll for the 15.0 from my system 32 folder and placing it in theirs but thinking that probably wouldn't work but if it would, does anyone happen to know the name of the Microsoft Office 15.0 Object Library dll?
Go to the top of the page
 
Doug Steele
post Jan 30 2015, 07:40 AM
Post#2


UtterAccess VIP
Posts: 22,162
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Access 2010 uses Microsoft Office 14.0 Object Library, not Microsoft Office 15.0 Object Library. It's essential that you use the correct version: you cannot "pick and choose".
Go to the top of the page
 
dmhzx
post Jan 30 2015, 07:50 AM
Post#3



Posts: 7,035
Joined: 22-December 10
From: England


The way round problems like this is usually

1) Remove the reference completely and see if the project compiles OK.
If it does all is well.

If it doesn't then switch to late binding for what 'was' that references (Filedialog?)

2) Upgrade the one person to Office 2013 (like you have done for everyone else: What has that poor person done to be ostracised like that ) ( inserts emoticon to signify tongue in cheek)
Go to the top of the page
 
accesshawaii
post Jan 30 2015, 07:53 AM
Post#4


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


Doug,

We're all using Office 2010 and 15.0 is what we all have except for the one machine. The only option I have is for 15.0. I read up briefly on Microsoft Office Primary Interop Assemblies. I know that is installed. Would that have anything to do with changing the reference version? The object version is not directly tied to a Access. For example, if someone had Microsoft Outlook 365 and Access 2010, installed on the same machine, the Outlook references would be for the 365 version.

Are you familiar with the Interop Assemblies and know if that would change the version numbers? If so, maybe, just installing it on that user's machine would correct the problem.
Go to the top of the page
 
dmhzx
post Jan 30 2015, 07:58 AM
Post#5



Posts: 7,035
Joined: 22-December 10
From: England


15 is the one with Office 2013, which is what you get with Office 365.

If your company has a 365 sub, then I would bring that last person up to the standard of everyone else.

If ALL of you have Office 2010, then you can navigate to Office 14 and use that instead of 15

I think this is the one you want

C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\mso.dll
Go to the top of the page
 
Doug Steele
post Jan 30 2015, 08:01 AM
Post#6


UtterAccess VIP
Posts: 22,162
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Sorry, Dan, I don't know.

Might there be something relevant in Allen Browne's Errors using multiple versions of Access under Vista or Windows 7?
Go to the top of the page
 
accesshawaii
post Jan 30 2015, 08:45 AM
Post#7


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


We all have Office 2010, I'm positive of that. I'm thinking that the Interop installation had something to do with why it's 15.0. If I change the reference to that location to get 14.0, is that going to work on everyone else's machines when they download a new version? I'm thinking that's probably not going to work especially for the person who does not have the 15.0 because their dll is located in the system 32 folder but I could be wrong, which I hope I am.

Thanks for the link, Doug. I couldn't find anything in that.
Go to the top of the page
 
cheekybuddha
post Jan 30 2015, 08:50 AM
Post#8


UtterAccess VIP
Posts: 11,293
Joined: 6-December 03
From: Telegraph Hill


Are you using any features that are specific to Office 15? What about late-binding?

hth,

d
Go to the top of the page
 
dmhzx
post Jan 30 2015, 09:02 AM
Post#9



Posts: 7,035
Joined: 22-December 10
From: England


If that person has office 14, and it's been installed in the standard location, then it will be where I said it was a few posts back.

C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\mso.dll



So if it's in the same place for everyone, then it's going to work.

Otherwise, as cheekybuddha has supported my other two points, Are you actually using anything from that object library? (and I said how to check)
or late binding

I'm assuming that the 'one person' doesn't have a weird one off machine set up.
Go to the top of the page
 
accesshawaii
post Jan 30 2015, 09:21 AM
Post#10


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


As I said earlier, it's easy to fix manually, I just change the reference to 14.0. We don't necessarily need 15.0, it's the dll that is on every other computer except the one person whose latest and greatest is 14.0. They do not have a different OS, different Office version, everything is exactly the same on all machines. That's why more and more I'm thinking that the Interop Assemblie is responsible for placing 15.0 in place of 14.0.

I'm going to try your suggestion, so thanks for that but I think for the long-term fix, I'm going to try installing the Interop Assemblie on their machine and see if that does the trick. Since everyone already has 15.0 versions, I'd prefer that we're all on the same, so down the road, won't have to worry about running into this issue again.

Thanks all for the help.
Go to the top of the page
 
Doug Steele
post Jan 30 2015, 10:01 AM
Post#11


UtterAccess VIP
Posts: 22,162
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Dan: References to Office are seldom required. Try dmhzx's suggestion of removing the reference and seeing whether the application works.
Go to the top of the page
 
dmhzx
post Jan 30 2015, 10:08 AM
Post#12



Posts: 7,035
Joined: 22-December 10
From: England


Sorry |Dan, I wasn't clear enough.

All my suggestions were aimed at the MASTER database.
Change that to Office 14, and all should be well -- assuming that just removing 15 is not all that's needed
Go to the top of the page
 
accesshawaii
post Jan 30 2015, 11:41 AM
Post#13


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


Doug, I believe it's going to work but by default, doesen't Access use the dlls that are in the System 32 folder? My concern with that is down the road if we end up using references to other objects and they are 15.0 e.g. Microsoft Excel 15.0 Object, Word, etc. then we're going to need to make sure that we point the reference to the Office 14 folder each time.

I'm just a stickler for consistency where everyone is using the same versions as much as possible, so doing tasks like upgrades and changes are straight-forward without the need for any tweaks.

I do appreciate all the insight though and I am going with the fix that dmhzx suggested. Thanks again.
Go to the top of the page
 
Doug Steele
post Jan 30 2015, 12:09 PM
Post#14


UtterAccess VIP
Posts: 22,162
Joined: 8-January 07
From: St. Catharines, ON (Canada)


My understanding is that Access only uses those DLLs to which references are set.

Take a look in your System32 folder: there are dozens of DLLs there that Access doesn't care about!

A basic rule of thumb is "starve your references" (i.e.: have a few references set as you can get away with)
Go to the top of the page
 
accesshawaii
post Jan 30 2015, 12:17 PM
Post#15


UtterAccess VIP
Posts: 5,169
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


You're definitely right about that. The mso.dll is also in the System 32 folder, that's the default folder that Access opens when you Browse for references.

Good advice. I always try to exercise that too....Less is more in a sense. The less objects and references, API calls, etc, etc that you use the less likely you're going to end up having problems with the database working on other's machines.
Go to the top of the page
 
Smayder
post Jun 12 2019, 08:33 AM
Post#16



Posts: 1
Joined: 12-June 19



Hi Doug, what versions of Object Library works with Word 2013 ?
Go to the top of the page
 
gemmathehusky
post Jun 13 2019, 10:07 AM
Post#17


UtterAccess VIP
Posts: 4,683
Joined: 5-June 07
From: UK


The best solution is

1) to compile a mde/accde in A2010, and release that, - then the dbs will get built for your lowest version, and references won't get updated AND MORE IMPORTANTLY
2) don't allow multiple users to share/use the same copy of the database.
(ie, then a user using A2016 with HIS version wouldn't affect the user with A2010 on HIS version, in any event.)





--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
SpookyVince
post Jun 14 2019, 02:36 AM
Post#18



Posts: 3
Joined: 14-June 19



There is a clean way to add a reference into your project from code. Add the following and run the sub before the rest.
CODE
Sub AddReference()
    Dim VBAEditor As VBIDE.VBE
    Dim vbProject As VBIDE.VBProject
    Dim checkRef As VBIDE.Reference
    Dim Found As Boolean

    Set VBAEditor = Application.VBE
    Set vbProject = ActiveWorkbook.VBProject

    Found = vbFalse
    For Each checkRef In vbProject.References
        If checkRef.Name = "Microsoft Office 15.0 Object Library" Then
            Found = vbTrue
            GoTo CleanUp        ' If it is already added, don't add again
        End If
    Next

    vbProject.References.AddFromFile "(this is the path and filename of the .dll)"

CleanUp:
    If Found = vbTrue Then
        MsgBox "Reference already exists"
    Else
        MsgBox "Reference added successfully"
    End If

    Set vbProject = Nothing
    Set VBAEditor = Nothing
End Sub


Alternately, I think you could also use the .References collection directly by using the {GUID} of the DLL and this could be a little trickier...
This post has been edited by SpookyVince: Jun 14 2019, 02:39 AM
Go to the top of the page
 
JonSmith
post Jun 14 2019, 06:56 AM
Post#19


UtterAccess VIP
Posts: 4,047
Joined: 19-October 10



Just want to clear up a few things.

Its not a '2010' database.
Access databases are really only either .mdb format or .accdb format (runtime versions as offshoots of these).

Your .accdb can have references to Office/Access 2007 up to 2016, it might also have some objects that are only available in a higher version, for example empty cells in a form layout (added in a later release) cannot work in 2007 and will crash Access. The database opens and runs fine as long as you dont go to that specific form.

Your database has references to 2013 so really needs to be opened on machines with that or higher.

Now your current setup sounds wrong. Machines with 2010 on it should have references to 14.0 as indicated.
QUOTE
That's why more and more I'm thinking that the Interop Assemblie is responsible for placing 15.0 in place of 14.0.

Can you elaborate on this, as far as I know you don't install the Interop separately, its just part of your Office installation so having a 15.0 reference with a 2010 install makes no sense to me.

Either way, the robust fix would be to reinstall/upgrade office on all affected machines so the references are correct and consistent. (the 14.0 machine is the correct and consistent one).
Go to the top of the page
 
gemmathehusky
post Jun 14 2019, 07:11 AM
Post#20


UtterAccess VIP
Posts: 4,683
Joined: 5-June 07
From: UK


just to go back

QUOTE
We have a master copy of an Access 2010 database on a network that is automatically downloaded to the user's machine whenever a change is made. On the master version, there is a reference to the Microsoft Office 15.0 Object Library. This works with all the user's machines except for one. There is one person who does not have the 15.0 library, they have the 14.0, so everytime they download a new copy, they get a missing reference error.



I expect a user is trying to use the master database directly, causing the references to change, rather than just copy it to their own folder. I assume you issue this with the references to 14.0. Check the date, and you will probably see the date change from when you released it. You could add a table to record the windows name of anyone who opens the master database. It might be useful.





--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    19th June 2019 - 10:44 AM