Access automation object model

B

Bill foust

Where can I find documentation on the Access automation object model? I have
found and read Q317113 (How to Automate Microsoft Acces by using Visual C#)
and have made a simple test application to begin testing with.

I'm trying to access the code that makes up Modules, forms and Macros and
the obvious approaches are not working. App.Modules and App.Forms are both
empty when the MDB file that was opened does indeed have some forms and
Modules. Also, I can find no way to access the Macros. Sure, there is a KB
doc out there on how RUN macros, but I want to examine the macro objects
without running them.

I notice there is an interface AllForms, but cannot figure out what it is
used for, hence the question about the Object model.

thank
bill
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?QmlsbCBmb3VzdA==?=,
Where can I find documentation on the Access automation object model? I have
found and read Q317113 (How to Automate Microsoft Acces by using Visual C#)
and have made a simple test application to begin testing with.

I'm trying to access the code that makes up Modules, forms and Macros and
the obvious approaches are not working. App.Modules and App.Forms are both
empty when the MDB file that was opened does indeed have some forms and
Modules. Also, I can find no way to access the Macros. Sure, there is a KB
doc out there on how RUN macros, but I want to examine the macro objects
without running them.

I notice there is an interface AllForms, but cannot figure out what it is
used for, hence the question about the Object model.
All documentation on the Office object models is in their individual Help
files. For example, if you start Access, press Alt+F11 to go into the VB IDE,
you can search Help. I believe AllForms is what you're looking for, as far as
telling Access to start up a particular form goes.

In order to work with VBA modules, you need the VB Extensibility library. This
is not part of Access, but a separate, Office-wide library. Go into the VB IDE,
press Ctrl+G to open the Immediate Window. Type something like the following,
then press F1 to go into the Help

?Application.VBE.ActiveVBProject.VBComponents

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
D

david epsom dot com dot au

The Modules collection and the Forms collection are collections
of open Modules and Forms.

Actually, collections of Modules and Forms that Access has opened -
you can create and show a form object based on a form class without
putting a reference into the Access collection.

Since the forms and modules are stored in the database, you may
wish to enumerate them using the DAO documents collections. You
will still have to open them in Access to use the Access methods.

Once you have the names, it may also be possible to use VBA to
open them, and use the VBE methods.

(david)
 

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