create MDA?

P

pietlinden

Hopefully a dumb question...

Say I have a ton of pre-existing databases on which I need to run the
same standard routines - e.g. create a union query to generate a
normalized view of a table's data,
create several summary queries... etc

I need to run these routines on pretty much every database - the logic
of what gets created could get determined by a function...

Would I put all this code into an MDA and then just register it and
run the stuff? Or would I be better off putting the code into a
regular MDE that could attach to another database and do all the work
under the covers?

If I would be better off creating an MDA, is there a good link
somewhere that explains how to do it?
(I'm using Access 2002, if it matters.)

Thanks
 
T

Tony Toews [MVP]

Would I put all this code into an MDA and then just register it and
run the stuff? Or would I be better off putting the code into a
regular MDE that could attach to another database and do all the work
under the covers?

There's no real difference between an MDA and MDE other than th
extension. Although it's sort of understand than an MDA will have the
USysRegInfo table so you the developer or power user con conveniently
put an add-in in place using the appropriate menu item. Utilities
such as Rick Fisher's Find and Replace use this table.

However you don't really need an add-in like that. You just want to
run code from a "code" MDE. See
http://www.granite.ab.ca/access/addins.htm for some tips. And do some
searches using "microsoft access add-in" as your keyword.

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/
 
P

pietlinden

There's no real difference between an MDA and MDE other than th
extension.  Although it's sort of understand than an MDA will have the
USysRegInfo table so you the developer or power user con conveniently
put an add-in in place using the appropriate menu item.  Utilities
such as Rick Fisher's Find and Replace use this table.

However you don't really need an add-in like that.  You just want to
run code from a "code" MDE.   Seehttp://www.granite.ab.ca/access/addins..htmfor some tips.  And do some
searches using "microsoft access add-in" as your keyword.

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 athttp://www.granite.ab.ca/accsmstr.htm
   Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

Okay, great! Thanks to you both for clarifying. BTW, when did M$
decide you needed to log in to read their help files? So much for
free information...
 
J

John W. Vinson

Okay, great! Thanks to you both for clarifying. BTW, when did M$
decide you needed to log in to read their help files? So much for
free information...

You don't. I don't log in, for that matter.

The webpage is NOT the newsgroups - it's just their (not very good)
newsreader. You can use Outlook Express or Agent or any other newsreader,
pointed to msnews.microsoft.com as the news server, to get free and unfettered
access to these newsgroups.
 
T

Tony Toews [MVP]

BTW, when did M$
decide you needed to log in to read their help files? So much for
free information...

<shrug> No idea. I'm still mostly using A2003 along with A97 help
files.

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/
 
P

pietlinden

<shrug>  No idea.  I'm still mostly using A2003 along with A97 help
files.

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 athttp://www.granite.ab.ca/accsmstr.htm
   Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

Is it possible to get the A97 help files somewhere? every help file
since then has been a total joke.
 
D

david

In the current versions of Access it is difficult if not impossible
to reliably "call" code in a database added as an add-in. So if
you intend to ever call the code from your application, you need
to load it as a library reference, or include it in your application.

On the other hand, once you've registered an add-in it is always
registered when you start Access, so if you intend to only run the
code from the add-in menu, you never again need to include it
in your application, or attach it to your application as a reference.

It doesn't work as expected if you are using a command line
"profile" to start Access, but nobody does that anymore.

CurrentDB always refers to the main loaded application database.
In an Add-In or Reference CodeDB refers to the library database.
DoCmd actions always refer to CurrentDB. In a referenced library
forms and reports and queries bind to tables and queries in the
library database. I think that is the same in an Add-In.

So if you have any bound forms in your library, they won't bind to
the tables in your target application database. So if your tools
include forms that you have to bind to your data in each application,
better to include the code in each application, rather than using
a library reference. I think an Add-In works the same way as a
library reference. But most tools don't have to be re-linked every
time you use them, so that was never a limitation for Add-Ins.


To create an Add-in, all you need to do is add to the MDB the
USysRegInfo table which has the function names and menu names.

(david)
 
T

Tony Toews [MVP]

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