Reports_AddIn_2
Sample
Add-In - Explanatory
Notes
General:
This Add-In is meant to utilize a set of common reports belonging to the Add-In,
in various db's. Queries in host db are used as record source for such reports.
On activation of the Add-In, names of reports belonging to the Add-In are shown
in a list box at left, while names of queries available in host db are displayed
in list box at right.
For a given report selected in left list box, the user can select an appropriate query in right list box. The selected report will open, using selected query as its record source.
Version: Access 2000 File format
Reference Required: DAO 3.6
Installation
The folder Reports_AddIn_2
should be put directly on the C: drive, so that the path for .mda file is
-
C:\Reports_AddIn_2\Reports_AddIn_2.mda. (This is
important, so as to establish the correct registry key)
Open any database
in Access and click on Tools > Add-Ins > Add-In Manager.
Click on Add New. Browse to the folder and file at
C:\Reports_AddIn_2\Reports_AddIn_2.mda
Click OK. This will copy the .mda file to
Microsoft's default Add-in folder for Access.
You have to do this only
once.
Use
To use Reports_AddIn from within any
database, click Tools > Add-Ins > Reports_AddIn_2
For a practical demonstration, import table TA_Books and queries QA_Books_1 to 3 from Add-In to host db. Rename the imported queries as desired, say Q_Books_1 to 3. Now, run the Add-In and open the report RA_Books (belonging to the Add-In) with different queries of host db (Q_Books_1 to 3, one by one) as its record source.
Technical Notes:
Certain factors having a bearing on use of CodeProject / CodeDb are placed below,
for ready reference:
2 - For code contained in modules belonging to the host
db:
(a) CurrentProject /
CurrentDb are identical to CodeProject / CodeDb respectively, always
referring to the host db, irrespective of the fact whether the AddIn is in
activated state or not.
(b) Whereas code in the AddIn can
access all tables / queries / forms / reports, whether belonging to AddIn
or the host db (see para 1 (e) above), code in host db can directly access only
the objects belonging to host db itself.