Common Code

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

Guest

Access is great for linking tables between databases to share common data
bretween databases. Is there any way to share code between databases?

I tried to put the code in a comon database and
1 - Delete the module if it exists. This fails because the subroutines and
functions are referenced in other modules within the project.
2 - Imported the module into the selected database. I get the same module
with a new version number appended.

The only development tools I have are Access and Excel. I know it is
possible to create a DLL in VB. Alas, I don't have VB <sigh>.

TIA
 
Steve

I would suggest creating, what we call, an Access Framework. Create a master
Access database that contains all the objects you want to have when you
build an Access application. Maybe you have predefined About box forms or
Menu forms, etc. Whenever you need to start a new project, copy the master
database and proceed foward.

HTH

--
Rob Mastrostefano

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
 
Rob,


Thanks for your idea. However, then I have to maintain the code in each
Access application. I'm looking for a single instance of the code to be
referenced and used in multiple applications.

Also, if I'm modifying existing applications and need the same common
subroutines and functions in each this approach won't work.


Regards,

Steve
 
Another approach that Steve left out (I think) was to use his suggested
"Framework" as a separate Library database to which you establish a
reference in the VBE (like you'd establish a reference to DAO, ADO, etc.).
That way your "library" db provides common objects, functions & code that
can be used by any db that references it.

HTH,
 
Steve,

You can put your "common code" in an mde, and then set a Reference to
that mde from the other apps.
 
Back
Top