[AccessD] Open report from remote db

Hale, Jim Jim.Hale at FleetPride.com
Mon Apr 16 14:31:23 CDT 2007


A number of years ago when I first started running Access queries from
inside Excel I found that I was unable to run queries with functions in the
database for criteria. I was told this was a limitation of VBA (I was using
office 97). Ever since then I have gotten around this by using sub queries
which get the criteria from a table, ie a pure sql solution. This thread has
me wondering if it is possible to use Access functions within queries
executed from within Excel by using different referencing?
Jim Hale 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.TEJPAL
Sent: Monday, April 16, 2007 9:19 AM
To: Access Developers discussion and problem solving
Cc: A.D.TEJPAL
Subject: Re: [AccessD] Open report from remote db


Lonnie,

    Two alternatives are available as follows, for viewing / printing
reports & forms belonging to external db:

    (a) Library reference to external db:
    (i) In local db, set up library reference named "External" to the
external db and then call subroutines & functions belonging to external db
by using the qualifier "External." 
    (ii) In the code modules of external db, care is to be taken to use
CodeDb & CodeProject in lieu of CurrentDb & CurrentProject respectively,
wherever occurring.
    (iii) Automatic setting up of correct reference to external db can be
ensured programmatically, through code in start-up form of local db.

    (b) Access automation:
    Activate the external db via automation and toggle respective
visibilities of local & external db's appropriately, for user convenience.

    Two of my sample db's mentioned below, might be of interest to you:
    (a) ExternalDbAsLibraryRef
    (b) ExternalDbAutomation

    Both samples are available at Rogers Access Library (other developers
library). Link -
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Tejpal,A.D.
 
    You could adapt the underlying approach suitably, for your specific
needs.
 
Best wishes,
A.D.Tejpal

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list