Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2002
    Posts
    6

    Unanswered: Open Accessdatabase from another Accessdatabase

    I want to open Accessdatabase from another Accessdatabase without opening any objects (just open the database, visible for the user) in code. Does anyone know the syntax?

  2. #2
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    122
    Shell "msaccess.exe " & Chr(34) & "C:\Path\File.mdb" & Chr(34)

    Good luck

    Dan

  3. #3
    Join Date
    Jul 2002
    Posts
    6

    Space in the path?

    It will work if there aren't any spaces in the path. Do you know how to do if there are spaces?

  4. #4
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    122
    Actually it should work with spaces, because of the Chr(34) characters (").

    I have tested something like:

    Dim strPath$
    strPath = "C:\My Documents\My Access Databases\TestDb.mdb"
    Shell "msaccess.exe " & Chr(34) & strPath & Chr(34)

    and it worked OK.

    Alternative:
    Shell "msaccess.exe " & """" & strPath & """"

    which I use in my apps.

    Regards,

    Dan

  5. #5
    Join Date
    Jul 2002
    Posts
    6
    Thankyou it worked fine now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •