Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Quick Queries #91    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Opening Programmatically
Sandra Truax 
         
12 hours ago
I think what he means is he wants to be able to open another database from within Access but have it open in another process also. I switch databases all day long, and I do this from within Access also (see below) but it was using the same process even if I tried to open it with the .lnk file. After I couldn't get it to work I asked ChatGPT and after multiple tries finally got it working but have to use a .bat file with the shortuct to Access then it will open what I select in a new process.

We got it to work using cmd.exe but Norton wanted to block it each time. Below is how I switch from one database to another. If I want two open I use the link on my computer.
Sandra Truax OP  @Reply  
         
12 hours ago

Sandra Truax OP  @Reply  
         
12 hours ago
My porch light came on while I was typing this and I used your ShiftIsPressed code to determine whether or not to close the current database when an item is selected. That way I can either switch or have them both open and don't have to use the link on my computer.
Richard Rost  @Reply  
          
6 hours ago
You should be able to do this with the Shell command by launching MSACCESS.EXE directly and passing the database file as a command-line argument. In other words, don't just shell (or FollowHyperlink) the ACCDB file itself. Shell Access, then give it the database path.

Something like:

Shell """C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE"" ""C:\MyFolder\MyDatabase.accdb""", vbNormalFocus

That should open the selected database in a separate Access process. The key is making sure both paths are wrapped in quotes, especially if there are spaces in the folder or file names.
Sandra Truax OP  @Reply  
         
6 hours ago
Richard That was the first thing I tried, but it opens it in the existing process if another database is open. I even tried opening the link file that has the "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" in it, and it opened in an existing process.
Darrin Harris  @Reply  
      
3 hours ago
Hello Sandra

Richards code works for me opens in a new process.
If you break Richards code down it would look like this:

    Dim AccessPath As String
    Dim FilePath As String
    Dim FileName As String

    AccessPath = """C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE"" """
    FilePath = "C:\MyFolder\"
    FileName = "MyDatabase.accdb"""

    Shell AccessPath & FilePath & FileName, vbNormalFocus
Add a Reply Upload an Image
Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/10/2026 2:01:55 AM. PLT: 1s