Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Reference priority with VBA? 2

Status
Not open for further replies.

VicM

Programmer
Sep 24, 2001
444
US
Hi:

I've written an Access 2000 db and in the course of development, I used several DAO references. When the module code threw errors, I discovered that I didn't have the DAO360.dll library installed. So I installed it.

Again, I got the same errors. So I moved the priority of the DAO360.dll above the ADODB library and everything worked well.

Since this db will be used by a few network clients, who are not computer savvy, I'd like to set the references in their application using VBA code in an AutoOpen macro. I've learned how to do that, but have not found a way to set the priority of the library file in VBA.

I'm concerned that when I set the reference by code in the user's application, if it's priority is not above that of the ADODB, the db will fail.

Does anyone know of a way to set the priority of the reference using VBA?

Thanks in advance,
Vic

P.S. On a tangential subject, when I use the help function and look for a method or object, etc., I often get a huge list of items. And when I click on one of those items, 9 times out of 10, there is no help. This is very evident for all the ADO functionality.

I've done a complete reinstall of Access, selecting all the help items and nothing changes.

Even checking the Microsoft site has proven elusive. One link which looked like if might be the answer, proved to be a broken link, or file removed, I don't remember which.

Does anyone have the same prob in Access2000? If not, where did you get your set of help files?

Again, thanks,
Vic
 
I'm going on a hunch here, but in your code, if you use

dim object as DAO.recordset

and the likes of that, there shouldn't be any more conflicts...

Lemme know if that helped.. --------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
 
nvsbe is right, if you prefix your data objects with the library name the conflicts will go away. Any library you use needs to be checked in the references but there is no problem using DAO and ADO together as long as the objects are explicitly defined.

dim object1 as DAO.recordset
dim object2 as ADODB.recordset
 
NVSbe & cmmrfrds:

Thanks for your responses.

It took me a bit before it sunk in, but the light finally dawned. (The older we get, the thicker our skulls, I guess. :-}

This should do just fine.

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top