Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Virginia
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    RunApp command line

    I am trying to open a database from another database using RunApp. The name of the database I am trying to open is 2 words separated by a space: Example My Data.mdb
    Access doesn't like the space. How do I do this without renaming the database?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: RunApp command line

    Put square brackets around the database name when you reference it in code.
    Charlotte

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Virginia
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RunApp command line

    Thanks for your reply. I tried this and it doesn't seem to work. My command line is:C:Program FilesMicrosoft OfficeOfficemsaccess.exe J:[Audit Reports.mdb]; Forms![frmSelectBndAudit#]. If I rename the database to "AuditReports.mdb" it works fine, but this is on a network and being used by others. Am I doing something wrong?

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RunApp command line

    The following VBA code seems to work OK with a filename containing spaces.
    <pre>Call Shell("crogram filesMicrosoft officeofficemsaccess.exe ""d:ianscompaccessCopy of db1.mdb""", vbNormalFocus)
    </pre>

    Ian.

Posting Permissions

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