473,503 Members | 12,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

understading references in MS Access

Hi Gurus

I have recently discovered references in the VB section of MS Access,
however, when choosing references, I noticed that there are more than who
knows how many options. How and/or where do you i get more information on
all the references available? Are there any that I should be using / should
be avoiding (I know about the DAO stuff)?

Keen to hear any suggestions.

TIA

- Nicolaas
Nov 13 '05 #1
11 1819

"WindAndWaves" <ac****@ngaru.com> wrote in message
news:Jt********************@news.xtra.co.nz...
Hi Gurus

I have recently discovered references in the VB section of MS Access,
however, when choosing references, I noticed that there are more than who
knows how many options. How and/or where do you i get more information on
all the references available? Are there any that I should be using / should
be avoiding (I know about the DAO stuff)?

Keen to hear any suggestions.


In my opinion you should avoid ALL of them.

I should qualify that. Open a new blank file and look at the three or four
references that are set by default. Those are all you should ever need. If you
build functionality that is dependent on other references you will have nothing
but grief if you try to use those files on PCs besides the development box.

On the rare occasion that you need to automate an outside library use late
binding which doesn't require a hard reference and you will have a much easier
time when distributing to multiple target machines.

Also don't be confused into thinking that what you are seeing is a "list of
references provided by Access that you can add to your Access app". It is
actually a list of registered libraries on your Windows OS. There is no
implication that you should (or even can) use all of them in your Access app.
The same applies to the "additional tools" toolbar that is available in form and
report design. That is a list of all registered ActiveX controls on your
system, but only a small minority of them are compatible with Access.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #2
You should include only the references that are necessary for your
application. If you distribute an application to a machine that does
not have the reference installed, then your application will fail.

On Tue, 12 Oct 2004 11:06:32 +1300, "WindAndWaves" <ac****@ngaru.com>
wrote:
Hi Gurus

I have recently discovered references in the VB section of MS Access,
however, when choosing references, I noticed that there are more than who
knows how many options. How and/or where do you i get more information on
all the references available? Are there any that I should be using / should
be avoiding (I know about the DAO stuff)?

Keen to hear any suggestions.

TIA

- Nicolaas

**********************
ja**************@telusTELUS.net
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
Nov 13 '05 #3
"Jack MacDonald" <ja**************@telus.net> wrote in message
news:36********************************@4ax.com...
You should include only the references that are necessary for your
application. If you distribute an application to a machine that does
not have the reference installed, then your application will fail.


Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?

I am sure that some of these libraries are super useful, if only I knew how
to use them.
TIA

- Nicolaas
Nov 13 '05 #4
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2t*************@uni-berlin.de...

"WindAndWaves" <ac****@ngaru.com> wrote in message
news:Jt********************@news.xtra.co.nz...
Hi Gurus

I have recently discovered references in the VB section of MS Access,
however, when choosing references, I noticed that there are more than who knows how many options. How and/or where do you i get more information on all the references available? Are there any that I should be using / should be avoiding (I know about the DAO stuff)?

Keen to hear any suggestions.
In my opinion you should avoid ALL of them.

I should qualify that. Open a new blank file and look at the three or

four references that are set by default. Those are all you should ever need. If you build functionality that is dependent on other references you will have nothing but grief if you try to use those files on PCs besides the development box.
On the rare occasion that you need to automate an outside library use late
binding which doesn't require a hard reference and you will have a much easier time when distributing to multiple target machines.

Also don't be confused into thinking that what you are seeing is a "list of references provided by Access that you can add to your Access app". It is
actually a list of registered libraries on your Windows OS. There is no
implication that you should (or even can) use all of them in your Access app. The same applies to the "additional tools" toolbar that is available in form and report design. That is a list of all registered ActiveX controls on your
system, but only a small minority of them are compatible with Access.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?

I am sure that some of these libraries are super useful, if only I knew how
to use them.
TIA

- Nicolaas

Nov 13 '05 #5
"WindAndWaves" <ac****@ngaru.com> wrote:
Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?

I am sure that some of these libraries are super useful, if only I knew how
to use them.


This is the biggest problem with using "libraries" or references. The user may
already have that same DLL/OCX on their system but a newer/older version. If they
install your newer version another app on their system may puke. If they keep the
newest version then your app may puke.

Also you may not be, likely aren't, allowed to redistribute many of these either.
They are licensed from some app on your system. But you can't turn around and send
them off.

Finally most of them won't work in Access anyhow.

Many ActiveX controls do not work inside MS Access unless the vendor specifically
states that they do support Access. In which case they will likely also have sample
code on their website. For more details see the following Knowledge Base articles at
support.microsoft.com.

ACC97: Custom ActiveX Control Features Supported in MS Access 97 - 164241
ACC97: ActiveX Controls List Doesn't Show All ActiveX Controls - 174964
ACC2000: Custom ActiveX Control Features Supported in Access - 202104
ACC2000: Supported ActiveX Controls for Microsoft Access 2000 - 208283

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #6

"Tony Toews" <tt****@telusplanet.net> wrote in message
news:o9********************************@4ax.com...
"WindAndWaves" <ac****@ngaru.com> wrote:
Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?

I am sure that some of these libraries are super useful, if only I knew howto use them.
This is the biggest problem with using "libraries" or references. The

user may already have that same DLL/OCX on their system but a newer/older version. If they install your newer version another app on their system may puke. If they keep the newest version then your app may puke.

Also you may not be, likely aren't, allowed to redistribute many of these either. They are licensed from some app on your system. But you can't turn around and send them off.

Finally most of them won't work in Access anyhow.

Many ActiveX controls do not work inside MS Access unless the vendor specifically states that they do support Access. In which case they will likely also have sample code on their website. For more details see the following Knowledge Base articles at support.microsoft.com.

ACC97: Custom ActiveX Control Features Supported in MS Access 97 - 164241
ACC97: ActiveX Controls List Doesn't Show All ActiveX Controls - 174964
ACC2000: Custom ActiveX Control Features Supported in Access - 202104
ACC2000: Supported ActiveX Controls for Microsoft Access 2000 - 208283

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm

So then it really would be best to ditch all the references. Oh well. I
will do my best to get rid of as many as possible in my application.

at the moment, I use:

visual basic for applications
MS Access 11.0 object lib.
Ole automation
MS DAO 3.6
MS ActiveX Data objects 2.5 Library
MS office 11.0 object lib
MS shell controls and automation
MS outlook 11.0 object lib
Nov 13 '05 #7
"WindAndWaves" wrote
So then it really would be best to
ditch all the references. Oh well. I
will do my best to get rid of as many
as possible in my application.
No, only those that you don't need.
at the moment, I use:

visual basic for applications
MS Access 11.0 object lib.
Ole automation
MS DAO 3.6
MS ActiveX Data objects 2.5 Library
MS office 11.0 object lib
MS shell controls and automation
MS outlook 11.0 object lib


Unless you actually use ADO code, you can uncheck the MS ActiveX Data
Objects 2.5 Library. And you may be able to uncheck the Office Lib and
Outlook Lib unless you are automating other apps. I don't know about the
"shell controls" -- I don't have them in my test application for Access
2003.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #8
WindAndWaves wrote:
"Jack MacDonald" <ja**************@telus.net> wrote in message
news:36********************************@4ax.com...
You should include only the references that are necessary for your
application. If you distribute an application to a machine that does
not have the reference installed, then your application will fail.

Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?


The answer is it depends. If the reference is to code you created and
that you intend to provide and register with the operating system then
perhaps yes but if it is software (like Outlook or Office) that the
customer installs then no. (That's a general answer and exceptions
exist).

References allows VBA to work with software (code) that is not part of
Access. But there are licensing issues; you can't distribute Office
with your application - you can provide the reference that would allow
VBA to work with it.

But that software may not be installed where the reference expects it
or it may not be version you have on your development PC.

You can avoid these problems using "late-binding" - that is a "generic"
reference without specifying a location or version and instead that
info is provided by the client's operating system.

This is the most common way of developing more professional applications
for distribution. You can search this newsgroup for more info on
late-binding and references.

--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 13 '05 #9

"John Mishefske" <mi****@execpc.com> wrote in message
news:10*************@corp.supernews.com...
WindAndWaves wrote:
"Jack MacDonald" <ja**************@telus.net> wrote in message
news:36********************************@4ax.com...
You should include only the references that are necessary for your
application. If you distribute an application to a machine that does
not have the reference installed, then your application will fail.

Thank you for your answer. I have some more questions:

Is there a way to 'attach' the libraries when distributing a database?


The answer is it depends. If the reference is to code you created and
that you intend to provide and register with the operating system then
perhaps yes but if it is software (like Outlook or Office) that the
customer installs then no. (That's a general answer and exceptions
exist).

References allows VBA to work with software (code) that is not part of
Access. But there are licensing issues; you can't distribute Office
with your application - you can provide the reference that would allow
VBA to work with it.

But that software may not be installed where the reference expects it
or it may not be version you have on your development PC.

You can avoid these problems using "late-binding" - that is a "generic"
reference without specifying a location or version and instead that
info is provided by the client's operating system.

This is the most common way of developing more professional applications
for distribution. You can search this newsgroup for more info on
late-binding and references.

--
'-------------------------------
' John Mishefske
'-------------------------------

Thanks John, I will do some research on late binding.

Kind regards
- Nicolaas
Nov 13 '05 #10
"WindAndWaves" <ac****@ngaru.com> wrote:
Thanks John, I will do some research on late binding.


Standard blurb follows.

Late binding means you can safely remove the reference and only have an error when
the app executes lines of code in question. Rather than erroring out while starting
up the app and not allowing the users in the app at all. Or when hitting a mid, left
or trim function call.

You'll want to install the reference if you are programming or debugging and want to
use the object intellisense while in the VBA editor. Then,. once your app is
running smoothly, remove the reference and setup the late binding statements.

Sample code:
' Declare an object variable to hold the object
' reference. Dim as Object causes late binding.
Dim objWordDoc As Object
Set objWordDoc = CreateObject(" Word.Document")

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
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #11
"WindAndWaves" <ac****@ngaru.com> wrote:
So then it really would be best to ditch all the references. Oh well. I
will do my best to get rid of as many as possible in my application.

at the moment, I use:

visual basic for applications
MS Access 11.0 object lib.
Ole automation
MS DAO 3.6
MS ActiveX Data objects 2.5 Library
MS office 11.0 object lib
MS shell controls and automation
MS outlook 11.0 object lib


Access 11.0 object lib implies A2003. I'd suggest deleting any references not on
the below list one at a time and compiling to see if you have any problems in your
code.

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library

The Access 2003 default references when the MDB is in A2002/A2003 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.5 Library

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
32148
by: Michelle Collier-Moore | last post by:
Please could someone offer some advice regarding adding references to an Access database? I tried to open a project a few days ago sent to me by someone whose developer had left the company. I...
5
2953
by: John | last post by:
Hi I have my app in access 2000 and the office version I have is 10.0 (xp). When I send my app to clients (who have office 9.0/2000) as mde, how does my application work around the reference...
3
5870
by: SAM | last post by:
Hi everyone, I consider myself a very competent programmer when it comes to actual programming and analyzing the business that I'm modelling. I am now crossing into what I would consider Access...
3
1649
by: Lauren Wilson | last post by:
Hello good folks! It is WAY past time for me to figure out how to check for the existence of all referenced libraries on application startup and provide feedback to the user if they are not. ...
4
2802
by: Zlatko Matić | last post by:
Hello. I prepared a .mde file using Access 2003. When I tried to use it on a computer with Access 2002 installed, it didn't work, because some references were missing (lower versions). Therefore...
2
22215
by: S. van Beek | last post by:
Dear reader, For removing a reference in the VBA reference form I receive from Doug Steele the following code: ........... References.Remove refCurr
24
2785
by: MLH | last post by:
Most people tell me I only need 3 references. It seems that many of my problems are related to references. I don't know what a reference is, quite frankly. I wish that, instead of about 200...
30
2454
by: jeremygetsmail | last post by:
I've got an adp (Metrix.adp) with a reference to another adp (InteractSQL.adp). InteractSQL sits on a server, and is refered to by all of the clients (Metrix), which sit on the client machines...
3
3841
by: CenturionX | last post by:
Hello everybody: I'd like to know what references in my vba code are used or not. I work in a code made by another person previously, i founded to many references and i believe that someones...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.