Reference Libraries

S

Spencer.Sadkin

I set up a database to contain only functions so that it could be used
as a reference library by multiple users. Problem is that if any user
has a database open that is linked to the "functions datbase" i can
not go in and modify or create vba functions. Any suggestions?

Thanks
 
J

John Spencer

Create a database table that can hold the code for the functions.
Fields:
FunctionName - short name for function; probably the same name as the
function
FunctionCode - memo field containing the function code
FunctionPurpose - what does this function do
Warnings - limits on using the function, etc.
OtherRequiredFunctions - name of function(s) called by this function

Then allow the users to copy the code from the function to whereever they
need to use it.

You can develop your functions in any database and then copy and paste them
into the database table.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
S

Spencer.Sadkin

Create a database table that can hold the code for the functions.
Fields:
FunctionName - short name for function; probably the same name as the
function
FunctionCode - memo field containing the function code
FunctionPurpose - what does this function do
Warnings - limits on using the function, etc.
OtherRequiredFunctions - name of function(s) called by this function

Then allow the users to copy the code from the function to whereever they
need to use it.

You can develop your functions in any database and then copy and paste them
into the database table.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Well with that method I would think it would be easier to just import
the modules, but there has to be an easier way to use reference
libraries.
 
J

John Spencer

Sorry, I misunderstood what you are doing.

I don't have any suggestion on how to handle this situation.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
D

Douglas J. Steele

You should have your own copy of the reference library and make your changes
there. Once you've thoroughly tested it, you then have to get the users to
get out of the database and replace the existing library file with the new
one.

The fact that you're having this problem implies to me that your application
isn't split into a front-end (containing the queries, forms, reports, macros
and modules), linked to a back-end (containing the tables and relations).
Only the back-end should exist on the server: each user should have his/her
own copy of the front-end, ideally on his/her hard drive.
 
B

Brad

What I do is have a library.mdb which is my source code. Then I create an
mde from it. The end-users' applications have a reference set to
library.mde and I am free to modify my source mdb at any time. When I do
make changes I create a new mde and then drop it into the shared folder
where the old library.mde resided.

Brad

I set up a database to contain only functions so that it could be used
as a reference library by multiple users. Problem is that if any user
has a database open that is linked to the "functions datbase" i can
not go in and modify or create vba functions. Any suggestions?

Thanks
 
M

Marshall Barton

I set up a database to contain only functions so that it could be used
as a reference library by multiple users. Problem is that if any user
has a database open that is linked to the "functions datbase" i can
not go in and modify or create vba functions.


This essentially the same problem as updating each user's
front end datatbase and has the same distribution and
installation issues.

You need to keep a separate, developer's copy of the library
for you to edit the modules and test the changes. Then,
when everything is rock solid, you have to lock everyone
else out while you copy the new version over the old
version.
 
J

John W. Vinson

I set up a database to contain only functions so that it could be used
as a reference library by multiple users. Problem is that if any user
has a database open that is linked to the "functions datbase" i can
not go in and modify or create vba functions. Any suggestions?

Thanks

Well, this is really no different than a shared backend database; you can't go
in and change table designs while there are active users.

About the only solution I can suggest is to have a production library and a
development library; you would do all your changes and additions in the
development library, and when it's all working, find a time when the users are
all out (or kick them all out) and replace the production library with the new
version.

John W. Vinson [MVP]
 
T

Tony Toews [MVP]

I set up a database to contain only functions so that it could be used
as a reference library by multiple users. Problem is that if any user
has a database open that is linked to the "functions datbase" i can
not go in and modify or create vba functions.

This is correct. You can't modify a database objects in A2000 and
newer while a user is in it. Furthermore you shouldn't be sharing it
either.

Thus I would suggest you do the standard copy of the library database
down to the user workstation. Which has been suggested elsewhere in
this thread.

Also see my Add-in Tips, Hints and Gotchas page at
http://www.granite.ab.ca/access/addins.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
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