Linking to a central code library

N

Nedlog

Hi

I need help as I want to create a central code library of re-usable
VBA functions that can be used by any one of the four Access
developers in our team.

I have set this up by creating a Access add-in database
(CodeLibrary.mda) on a network share folder which contains any VBA
functions that can be re-used by other databases. I link to this mda
file using the Tools -> References feature of the Access VBA interface

- Is this the best way to create a central library of functions that
can be shared? (Does anyone have any experience with doing something
similar?)

- When any of the databases that are linked to the CodeLibrary.mda
file are open this causes the CodeLibrary.mda to be put into a state
where it can not be edited. I get the message "'You do not have
exclusive access to the database at this time. If you proceed to make
changes, you may not be able to save them later".
Is there any way to reference to the CodeLibrary.mda file in a 'read-
only' type manner so that having the linked databases open does not
cause locking?

Hope this is clear - please ask any questions if more clarity is
needed.

Thanks
N.
 
T

Tony Toews [MVP]

Nedlog said:
I need help as I want to create a central code library of re-usable
VBA functions that can be used by any one of the four Access
developers in our team.

Reasonable enough. See my Add-in Tips, Hints and Gotchas page at
http://www.granite.ab.ca/access/addins.htm for some things to watch
out for.
I have set this up by creating a Access add-in database
(CodeLibrary.mda) on a network share folder which contains any VBA
functions that can be re-used by other databases. I link to this mda
file using the Tools -> References feature of the Access VBA interface

- Is this the best way to create a central library of functions that
can be shared? (Does anyone have any experience with doing something
similar?)

I suspect you'd be best off ensuring each user and each developer have
their own copy of the add-in. In the same folder as the FE MDB/MDE.
I'd go further and suggest that it should be in MDE format just so
users can't muck with it. Although you can rename is an MDA when
finished making the MDE.

There should be the master CodeLibrary.mda that the developers can
update and work with. But it should be copied to the download folder
once it's been tested.
- When any of the databases that are linked to the CodeLibrary.mda
file are open this causes the CodeLibrary.mda to be put into a state
where it can not be edited. I get the message "'You do not have
exclusive access to the database at this time. If you proceed to make
changes, you may not be able to save them later".

Standard message when you have a shared FE MDB/MDE as well. So give
each user/dev their own copy of the CodeLibrary.mda.
Is there any way to reference to the CodeLibrary.mda file in a 'read-
only' type manner so that having the linked databases open does not
cause locking?

Not to my knowledge.

Also what happens when you want to do updates to the CodeLibrary.mda?
Wait until everyone gets out of it? That's another good reason to
give each dev/user their own copy.

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
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top