Results 1 to 3 of 3
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    "Shell" de bug

    I am trying to open another Access data base from another using the following formula.



    Code:
    Shell "ACCESS.EXE C:\Users\Jim\Desktop\TRUSTED\AASport.accdb", vbNormalFocus
    I get a Run-time error '53' message.

    Thoughts?

    Jim O

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    shell is a function ,
    and you may need the full path to Access:

    call Shell ("c:\program files\ACCESS.EXE C:\Users\Jim\Desktop\TRUSTED\AASport.accdb", vbNormalFocus)

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Just to confirm you do need the full path to the Access program file which is called MSAccess.exe
    The code will then work with or without using Call.
    If Call is used you need the brackets, otherwise not.

    Here is another method of doing the same thing

    Code:
    Dim db As DAO.Database
        
    Set db = DBEngine.OpenDatabase("full path to your database.accdb")
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-06-2018, 08:26 PM
  2. Replies: 3
    Last Post: 07-28-2017, 12:12 PM
  3. Replies: 2
    Last Post: 12-23-2015, 09:32 PM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Replies: 1
    Last Post: 09-03-2014, 03:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums