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
| 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
  #11 (permalink)  
Old August 31st, 2005, 05: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,
Inside your VBA code, check out help on the shell command. There may be differenct syntax since I'm using version 2003. Also, change the code I gave you to:

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

By adding the ,1 at the end, it brings the second database completely up on top of the other.

Let me know.

Kevin

dartcoach
Reply With Quote
  #12 (permalink)  
Old August 31st, 2005, 06:12 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 all ok now ajusted code and working fine

Reply With Quote
  #13 (permalink)  
Old August 31st, 2005, 06:16 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,
So everything is working OK? Do you want to close the other database when you open the other one? If not, when you close the second database, you will be right back where you were in the first one. Is that what you want?

Kevin

dartcoach
Reply With Quote
  #14 (permalink)  
Old August 31st, 2005, 06: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

Myfile = "C:\Documents and Settings\bartleyb\Desktop\Comms success.mdb"
retval = Shell("msAccess.exe " & """" & Myfile & """", vbMaximizedFocus)

DoCmd.Quit
Kevin I used the following code that sets focus on the opened database and closes the other database

Reply With Quote
  #15 (permalink)  
Old August 31st, 2005, 06:20 AM
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

I am still curious as to why two databases? If you need to go to the second one to update a record or add a new one when some activity is going on in the first database, can't you automate that? Are the databases so large that they can't be consolidated? Just curious. Glad it's working for you.



mmcdonal
Reply With Quote
  #16 (permalink)  
Old August 31st, 2005, 06:20 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,
Great! Glad I could help.

Kevin

dartcoach
Reply With Quote
  #17 (permalink)  
Old August 31st, 2005, 09: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

the second database is used to send an e-mail automatically to a group when equipment goes down

Reply With Quote
  #18 (permalink)  
Old August 31st, 2005, 11:41 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,
How big is this other database? Couldn't you import all the forms, queries, tables etc. into the current database and just add a button to do what you need to do? Or even link to the data you need? I really don't know what's best, not knowing what your whole process is.

Kevin

dartcoach
Reply With Quote
  #19 (permalink)  
Old August 31st, 2005, 12:27 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

That's what I am thinking. At least retrieve data from the second database and automate the email from the first database.

mmcdonal
Reply With Quote
  #20 (permalink)  
Old August 22nd, 2007, 04:03 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I used the same way to open the 2nd database and close the 1st one.

My problem is to hide the startup screen when the 2nd database starts by Shell command.

strOpenClient = "MSAccess.exe " & strDest
Shell strOpenClient, vbNormalFocus
DoCmd.Quit

Advanced thanks!
Mona

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 07:35 AM.


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