Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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.

Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.