Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shelling to another database (A97 -> A2K)

    In an Access 97 database, I issued the following command to open one Access database from another:

    Shell "g:clientsdelpapaCompactUtility.mdb", vbNormalFocus

    I converted the databases to A2K. When I run this code, I now get this message:

    Runtime error '5'. Invalid procedure call or argument.

    What has changed? I can find nothing in Help to explain it.

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Shelling to another database (A97 -> A2K)

    Recommend include complete path to Access 2K executable in path. Example:

    <pre>Public Sub TestShellFunction()

    Dim dblRtn As Double
    Dim strPath As String

    strPath = "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE " & _
    "C:ACCESSNorthwindTest.MDB"
    dblRtn = Shell(strPath, 1)

    End Sub
    </pre>


    HTH

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

    Re: Shelling to another database (A97 -> A2K)

    I hope that CompactUtility.mdb isn't a 97 database used to compact the current db, because if it is, you don't need it in Access 2000.
    Charlotte

Posting Permissions

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