References

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I recently rolled out my first Access/VBA app. When setting up workstations to use it, I thought at first that I had to make sure that the References my app used were loaded on each workstation. I seemed to find, however, that References go with the app. In other words if the .mdb being installed used certain References (such as DAO 3.6, etc) then they would be available automatically to everyone. Could someone please confirm for me that References go with the .mdb and not with the user/workstation.
 
Access is supposed to read the Windows Registration Database on each
computer to figure out where to find the built-in references. Most of the
time this works, but there are several things that can go wrong, <click> go
wrong <click>, go wrong, ... :-)

The Reg is quite different on Win95/95/ME than it is on Win2000/XP/2003. If
you cross the boundary between these two families of Windows, there is a
greater chance that Windows won't be able to find the correct reference.

Most importantly, use only the minimal libraries you need. You will rarely
have a problem if you use only the Access library, the VBA library.

The DAO reference can get messed up when you cross Windows families, or if
another program tampers with its registry entry. To re-register it, enter
something like this at the command line:
regsvr32 "c:\program files\common files\microsoft shared\dao\dao360.dll"

The ADO/ADOX libraries come in so many different versions that have nothing
to do with the version of Access. Particularly with ADOX, there are many
bugs, and so things are likely to break even if the library is where the Reg
expects it to be.

Other references such as Calender contol and MS Graph are also likely to
break just by switching to a different version of Access. And once to move
to other ActiveX controls, you have no guarentees at all.

In summary, if you are much less likely to have a problem with references if
you:
- Stay within one of the two families of Windows.
- Use only the Access, VBA, and DAO libraries;
- Install onto machines that have not been promiscuously installing other
software.

More info about which libraries are needed for each version of Access:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ctdak said:
I recently rolled out my first Access/VBA app. When setting up
workstations to use it, I thought at first that I had to make sure that the
References my app used were loaded on each workstation. I seemed to find,
however, that References go with the app. In other words if the .mdb being
installed used certain References (such as DAO 3.6, etc) then they would be
available automatically to everyone. Could someone please confirm for me
that References go with the .mdb and not with the user/workstation.
 
Allen,

Thanks once again for your detailed answer. It helps my understanding a lot. As it turns out, I am installing my app on Win2000 machines only and I am using the 3 libraries you mentioned along with one more - OLE Automation. I have no idea if/why I need OLE so I probably don't. It was probably just selected already by default when I first started programming in VBA and I left it selected. Would you recommend that I de-select that one and just use the other 3?

Clive
 
Try it.

From the code window:
1. Choose Compile from the Debug window to make sure everything is fine.
2. From the Tools menu, choose References, and deselect OLE Automation.
3. From the Debug menu, choose Compile again.

If the application still compiles without the library, you don't need it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ctdak said:
Thanks once again for your detailed answer. It helps my understanding a
lot. As it turns out, I am installing my app on Win2000 machines only and I
am using the 3 libraries you mentioned along with one more - OLE Automation.
I have no idea if/why I need OLE so I probably don't. It was probably just
selected already by default when I first started programming in VBA and I
left it selected. Would you recommend that I de-select that one and just
use the other 3?
 
Excellent. Thanks.


Allen Browne said:
Try it.

From the code window:
1. Choose Compile from the Debug window to make sure everything is fine.
2. From the Tools menu, choose References, and deselect OLE Automation.
3. From the Debug menu, choose Compile again.

If the application still compiles without the library, you don't need it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.


lot. As it turns out, I am installing my app on Win2000 machines only and I
am using the 3 libraries you mentioned along with one more - OLE Automation.
I have no idea if/why I need OLE so I probably don't. It was probably just
selected already by default when I first started programming in VBA and I
left it selected. Would you recommend that I de-select that one and just
use the other 3?
 
Back
Top