[AccessD] Open report from remote db

Heenan, Lambert Lambert.Heenan at AIG.com
Tue Apr 17 10:52:10 CDT 2007


Lonnie,

Rather than get involved in adding references dynamically (can you even do
that in an MDE file?) I would still go down the 'set a reference to the
other database' route. 

With luck you will get away with setting references to *all* the other
databases in the one central app. that fires off the reports. In each of the
other apps. Define a public function, each with a prefix unique to the
database it resides in (to avoid duplicate definition issues), and the
function will take a string parameter which will be the name of the report.
Then your central app. can call the function and produce the report. The
down side of all those references is that you may get conflicts with code
routines having the same name. As long as all the references are at the
bottom of the pile you should get away with it.

If that's a no-go, then another alternative is open to you. As they seem to
have accepted the notion of selecting the "other" database and a report in
it before clicking the magic button, why not just spawn the other database,
passing in the name of the report to run? 

You can do this with the /cmd command line switch, and you could use the /x
switch to run a macro which in turn calls a function that produces the
report and then exits the spawned database.

HTH

Lambert

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


Thanks. I guess I should have been more revealing. 

I have been asked to create a process by which the user can type in a
database path and name into one field and a report name in another field,
click a button and that report opens. So I will be adding references to the
main database dynamically and through code and retrieving the report. It
sounds like a pain but it's what they want. They are bent on certain
conveniences like not having to open another database.

Does that help?
 
May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us




 



----- Original Message ----
From: Michael R Mattys <mmattys at rochester.rr.com>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Sent: Sunday, April 15, 2007 9:23:16 PM
Subject: Re: [AccessD] Open report from remote db


Alright, Lonnie.
I think the simplest method would be to create a public function in the
referenced database that tells the report to open. Then it doesn't matter
where you call it from, it just pops up.

Michael R. Mattys
MapPoint & Access Dev
www.mattysconsulting.com
  ----- Original Message ----- 
  From: Lonnie Johnson 
  To: Access Developers discussion and problem solving 
  Sent: Sunday, April 15, 2007 9:01 PM
  Subject: Re: [AccessD] Open report from remote db


  Thanks for the tip. I have set a reference but do "see it" as you say. I
may need a little more hand holding. Never had to do this before.
   
  May God bless you beyond your imagination!
  Lonnie Johnson
  ProDev, Professional Development of MS Access Databases
  Visit me at ==> http://www.prodev.us




   



  ----- Original Message ----
  From: Michael R Mattys <mmattys at rochester.rr.com>
  To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
  Sent: Thursday, April 12, 2007 10:23:10 PM
  Subject: Re: [AccessD] Open report from remote db


  Hi Lonnie,

  Set a ref to that mdb and you should be able to 'see' it to call it.

  Michael R. Mattys
  MapPoint & Access Dev
  www.mattysconsulting.com
    ----- Original Message ----- 
    From: Lonnie Johnson 
    To: AccessD solving' 
    Sent: Thursday, April 12, 2007 11:14 PM
    Subject: [AccessD] Open report from remote db


    Can you open a report in one database from another database? 
     
    I know how to get the data from a query or table in another database
with...
     
    "SELECT * FROM TABLE/QUERYMAME IN 'C:\MYDB.MDB'"
     
    Any help?
     
    May God bless you beyond your imagination!
    Lonnie Johnson
    ProDev, Professional Development of MS Access Databases
    Visit me at ==> http://www.prodev.us




     



    Sucker-punch spam with award-winning protection.
    Try the free Yahoo! Mail Beta.


           
 
____________________________________________________________________________
________
    Don't pick lemons.
    See all the new 2007 cars at Yahoo! Autos.
    http://autos.yahoo.com/new_cars.html 
    -- 
    AccessD mailing list
    AccessD at databaseadvisors.com
    http://databaseadvisors.com/mailman/listinfo/accessd
    Website: http://www.databaseadvisors.com
  -- 
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com

  __________________________________________________
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam protection around 
  http://mail.yahoo.com 
  -- 
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list