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
> Set Default Library References, Access 2010    
 
   
ZippyThePinhead
post Dec 16 2017, 02:55 PM
Post#1



Posts: 45
Joined: 11-December 17



My accde project is failing to load on a few computers in the system. I think the issue is the library references on those machines, which may be missing some ActiveX object libraries. Is there any way to set the default references on those machines so every project that loads will have them? I've read conflicting views on whether or not the accde files can make these updates themselves, but since there are just a few machines involved I can easily do it manually. The problem is that, as far as I can tell, the changes I've made impact only the project that's open at the time and are not saved for other projects.
Go to the top of the page
 
theDBguy
post Dec 16 2017, 03:12 PM
Post#2


Access Wiki and Forums Moderator
Posts: 73,488
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Depending on which libraries you are using, you might consider switching to "late binding."

Check out this link.

Hope it helps...
Go to the top of the page
 
ZippyThePinhead
post Dec 16 2017, 03:19 PM
Post#3



Posts: 45
Joined: 11-December 17



I've read about late binding, but it sound like that just delays the problem: the project will load but will still fail when the missing resource is called. Isn't that kind of like running an accdb without compiling it and waiting for the errors to pop up?
Go to the top of the page
 
jleach
post Dec 16 2017, 03:45 PM
Post#4


UtterAccess Editor
Posts: 9,934
Joined: 7-December 09
From: Staten Island, NY, USA


Late binding allows you to check if a reference is present before you try to use it (whereas early binding will fail right off the bat without it). So if it's must-have functionality, then late binding isn't going to do much for you other than give you the chance to elegantly fail instead of inelegantly fail.

With that said, no, there's no way to set default references on a per-machine basis. When you deploy a new accde to whatever target stations, the references in the project are maintained and attempted to be loaded on startup. If they're not there, you wind up in a bad state: references that are required by the project, but have gone missing.

If you have control over the target machines, it's easy enough to ensure that they're present. If nothing else, open a dev copy on that machine and check the VBA References dialog for any that are labeled MISSING: then register the appropriate libraries. If you don't have control over them, you either need late binding to elegantly check and back out, or some sort of installer/launcher that ensures the required references are present prior to running the accde itself.

In short: references travel with the project, and the required libraries must be present and properly registered on the target machine.

hth
Go to the top of the page
 
ZippyThePinhead
post Dec 16 2017, 04:36 PM
Post#5



Posts: 45
Joined: 11-December 17



Okay. I'm sort of surprised that Microsoft didn't address this. Seems like a simple on/off switch would be a lot easier than all the late binding code that has to be added.
Go to the top of the page
 
jleach
post Dec 16 2017, 10:32 PM
Post#6


UtterAccess Editor
Posts: 9,934
Joined: 7-December 09
From: Staten Island, NY, USA


I'm not sure how you'd expect that to work. Should MS ensure that we have every library we might ever need installed?

It works the same way as every other application (MS or non-MS): if you require libraries, it's up to you to make sure they're installed.

With that said, there's a few standard libs that we can more or less always count on being present when working with Access: namely DAO, VBA, Office and Access. There's others that are pretty well standard on any given Windows box. But it is up to us to make sure.

Cheers,
Go to the top of the page
 
ZippyThePinhead
post Dec 19 2017, 11:49 AM
Post#7



Posts: 45
Joined: 11-December 17



I'm going to put this off. For now, I'll just compile to accde on the machine running the oldest version. that way it seems to work okay on all of the machines.
Go to the top of the page
 
jleach
post Dec 19 2017, 12:25 PM
Post#8


UtterAccess Editor
Posts: 9,934
Joined: 7-December 09
From: Staten Island, NY, USA


Ah, yes... it's standard practice to have to compile the accde on the lowest supported version. I hadn't realized there were version differences (and didn't think to mention it - should have), but any time you compile on a newer version and have an older version run it you're bound to run into issues.

There's a few special libraries: namely the Office suite ones, that will auto-update themselves in the upward direction. That is, a reference pointing to Access 2010 running on a 2013 machine will pick up the 2013 library automatically, but it's not backward compatible.

Beware though, while VBA will handle that for certain core libraries, not all of them will. XML 3 to XML 6 won't automatically update if 3 is noted and 6 is the only one available.

Cheers,
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th October 2018 - 07:21 AM