Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 30th, 2005, 11:06 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening One Database from another

Hi All Again
Is it possible to open one database from another database without using a hyperlink
Thanks
Brendan

__________________
Brendan Bartley
  #2 (permalink)  
Old August 30th, 2005, 11:20 AM
Authorized User
 
Join Date: Jun 2003
Location: Bromsgrove, Worcestershire, United Kingdom.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not sure if I can help, but could you not link to the other database, that way you can treat the other databases tables as if they were local.


Andy G
  #3 (permalink)  
Old August 30th, 2005, 02:33 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Do you just want to open it to have it come open on the main form? Or do you want to access its data (tables, queries)? Or do you want to run a report?


mmcdonal
  #4 (permalink)  
Old August 31st, 2005, 03:18 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I want to have a link from the main database to another smaller database this cannot be in the form of a hyperlink. The link will open the smaller database that is all it will do.

  #5 (permalink)  
Old August 31st, 2005, 03:23 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Kansas City, Missouri, USA.
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

As mmcdonal asked, when you link to this other database, do you want to pass control to it and open a form or what?

Kevin

dartcoach
  #6 (permalink)  
Old August 31st, 2005, 03:47 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes control will be transferred to the second database

  #7 (permalink)  
Old August 31st, 2005, 04:06 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Kansas City, Missouri, USA.
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brendan,
This will open the other database on top of the one you open it from:

Create a button on one of your forms and in the on click event put this:

Myfile = "C:\Kevins Stuff\Juice.mdb"
retval = Shell("msAccess.exe " & """" & Myfile & """")

It doesn't close the one you open it from, I haven't got that far yet.

Kevin

dartcoach
  #8 (permalink)  
Old August 31st, 2005, 04:46 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Kevin this does not seem to work what do you declare on you're code
Thanks
Brendan

  #9 (permalink)  
Old August 31st, 2005, 04:51 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Kansas City, Missouri, USA.
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Brendan,
What version of access are you using? The code I gave you is all there is.
I have two databases, and all I did was add a button to one of the forms on the first database, added that code I gave you, and it worked.
I didn't have to declare anything.

Kevin

dartcoach
  #10 (permalink)  
Old August 31st, 2005, 05:43 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Version 2000





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening & Closing Database connections pauliehaha Classic ASP Databases 4 December 18th, 2006 08:50 AM
Problems opening MS Access database JayM ASP.NET 2.0 Basics 1 June 5th, 2006 01:59 PM
Database Error message when opening Brendan Bartley Access 1 July 19th, 2005 12:26 PM
Problem in opening a VSS database on remote m/c nikunjn VS.NET 2002/2003 5 July 22nd, 2004 08:57 PM
Problem with database opening bukky Classic ASP Databases 1 April 23rd, 2004 10:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.