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
> How Do I Know If I Need All These References?, Access 2016    
post Jan 2 2018, 01:54 PM

Posts: 873
Joined: 26-March 02
From: St.Louis, MO, USA

I have inherited a few DBs that have what are probably standard references for whatever the VBA is doing. I am not familiar with choosing references and have only used them a few times selecting by trial and error.

I assume I could select dozens and it would not affect the VBA, but eliminate the wrong one and it will crash, right? Not the preferred method for testing if I can avoid it.
Is there a guide or how do you know when you need which reference and when you can eliminate some?
Does having additional references included that do nothing for the DB's needs matter or possibly affect the db's performance to the point I should try to determine and select only the ones I need?

Here are the ones listed in my DB for example:
This database opens and updates Excel spreadsheets and creates and sends emails with attachments. It also has links to and calls another db open and uploads files to shared directories and SharePoint.

Attached File  references.jpg ( 47.34K )Number of downloads: 1

Go to the top of the page
post Jan 2 2018, 02:02 PM

UA Admin
Posts: 33,777
Joined: 20-June 02
From: Newcastle, WA

Unneeded references probably don't impact much of anything UNLESS they happen to be available only on your development computer and not on the computers of users.
One way to find out if a reference is needed by your code is to remove it by unchecking and trying to compile the VBA. That'll raise errors immediately if there's a procedure that requires that reference. If it compiles without that reference, you can safely leave it unchecked.

Attached File  compilewithoutreferences.jpg ( 20.74K )Number of downloads: 1

Go to the top of the page
post Jan 2 2018, 02:23 PM

Posts: 873
Joined: 26-March 02
From: St.Louis, MO, USA

That's easy enough.
Go to the top of the page
post Jan 2 2018, 03:21 PM

UtterAccess VIP
Posts: 7,683
Joined: 24-May 10
From: Downeast Maine

Note that it is very likely you will need the first four on the list. For the others, if the code fails to compile without them, late binding may be an option, particularly for the last two. This is especially worth considering if there are or could be in the future several versions of Office in the deployed environment. Here is one article that describes this, although there are many others.
Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    19th October 2018 - 03:37 PM