Common code DB (MDA/MDE) - How To Create?

J

james.igoe

I'm currently workling in a middle office environment, and I've
created multiple databases for various groups, and I dislike the idea
of copying code into each DB, since much of the code is generic/
wrapped modules that can be reused, I wanted to cut down on the code
redundancy and consolidate in a single MDE/MDA.

Are there any good references, or does anyone have any good pointers?

James Igoe

http://code.comparative-advantage.com/
 
E

emilio

I'm currently workling in a middle office environment, and I've
created multiple databases for various groups, and I dislike the idea
of copying code into each DB, since much of the code is generic/
wrapped modules that can be reused, I wanted to cut down on the code
redundancy and consolidate in a single MDE/MDA.

Are there any good references, or does anyone have any good pointers?

James Igoe

http://code.comparative-advantage.com/
 
P

Pieter Wijnen

Quite simple
Just Add The Functions etc in a new Db, Make mde & Add Reference to it.
The caveats are:
If You want to access DAO Elements in the mde use CodeDb instead of
CurrentDb
To Open Forms /Reports in The mde, you need to have a Wrapper Function/sub
in it
ie
Public Function LibForm(FrmName As String) As Boolean
Access.DoCmd.OpenForm "LibForm"
End Function

To make createable Classes (using new)
Look in http://www.mvps.org/Access for the way to do it, you need to change
the (hidden) attributes of the class

Attribute VB_GlobalNameSpace = True
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True

Also, if you upgrade the mde & try to use the new version in a previous
front-end (mde), the reference will be broken.

HtH

Pieter
 
P

Pieter Wijnen

should be

Public Function LibForm(FrmName As String) As Boolean
Access.DoCmd.OpenForm FrmName
End Function

Offcourse

Pieter

"Pieter Wijnen"
 

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