Roger's Access Library Homepage
Forum Home Forum Home > Other Download Libraries > MS Access MVP Libraries > Tejpal, A.D.
  New Posts New Posts RSS Feed - ExternalDbAsLibraryRef.mdb
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)


 Post Reply Post Reply
A.D. Tejpal View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 30 Jun 2008
Status: Offline
Points: 192
Post Options Post Options   Thanks (0) Thanks(0)   Quote A.D. Tejpal Quote  Post ReplyReply Direct Link To This Post Topic: ExternalDbAsLibraryRef.mdb
    Posted: 09 Jul 2008 at 10:45pm

(Updated on: 12-Oct-2010)
Explanatory Notes

This set of db's named LOCAL.mdb and External.mdb respectively, is meant to
demonstrate display of forms and reports belonging to external db, within local db by setting up
library reference to it, in the local db acting as host. It covers (a) Display of external db forms
loaded with external db data, (b) Display of host db forms loaded with external db data,
(c) Display of external db forms loaded with host db data

The external db is located adjacent to local db in the same folder. Both db's are
in Access 2000 file format.

Two alternative styles are covered for displaying the external reports and forms.
In style 1, the selection forms used for picking up the reports / forms belong to external db
itself. In style 2, these selection forms belong to local db.
SQL statements serving as row source for respective list boxes in selection forms
are based upon tables based in external db. In load events of selection forms, these tables get
populated afresh with the names of form and reports in external db.

Two alternative styles for opening a form belonging to external db and loading it with

data from host db are also demonstrated. In one case, the task is accomplished without using
IN clause, while the other makes use of IN clause.

In local db, correct library reference to external db is set up programmatically during
load event of main switchboard. This is based upon external db (External.mdb) being housed in
the same folder that contains the local db. If there is any change in this set up, function
Fn_ExternalDbPath() in general module of local db, used for getting the path of external db, will
need suitable revision.

(a) In local db's module, name of library reference to external db has to be used as

qualifier for calling subroutines or functions belonging to external db.
(b) Within the module of external db (when serving as library reference), CodeDb
and CodeProject represent external db while CurrentDb and CurrentProject represent the
host db.

Version: Access 2000 file format.

    External Db - DAO 3.6
    Local Db - Nothing extra  

Back to Top
Sponsored Links

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.