• RunApp command line

    Author
    Topic
    #356096

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #526435

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

    • #526482

      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?

      • #526586

        The following VBA code seems to work OK with a filename containing spaces.

        Call Shell("c:program filesMicrosoft officeofficemsaccess.exe ""d:ianscompaccessCopy of db1.mdb""", vbNormalFocus)
        

        Ian.

    Viewing 1 reply thread
    Reply To: RunApp command line

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: