• Runcommand acCmdMakeMDEFile (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Runcommand acCmdMakeMDEFile (Access 2000)

    Author
    Topic
    #396182

    Okay, so I was putting a button on a form so a client could easily make an MDE that could be distributed to other users in organization. Except that when I clicked on the button, I got a message that said “Can’t make the open database into an MDE while running a macro or Visual Basic code”. So, what other circumstances are there where I could use that runcommand option without using a macro or code?

    Viewing 1 reply thread
    Author
    Replies
    • #740483

      This RunCommand instruction is not meant for use from within a “normal” Access session. You can’t turn the current database into an .mde programmatically, just like you can’t compact the current database in code. Instead, the instruction is intended for use in Automation, i.e. create an Access.Application object from an other application (VB6, Word, Excel, …). Even then, you must pass the arguments by issuing a SendKeys command, which is viewed with distrust by many.

      In the MS newsgroups, an “undocumented” feature is mentioned in connection with this:

      obj.SysCmd 603, ,

      where obj is an Access.Application object, for example (again, from another application)

      Dim obj As Access.Application
      Set obj = CreateObject(“Access.Application”)
      obj.SysCmd 603, “c:myapp.mdb”, “c:test.mde”

      • #740497

        I love having commands for which there is seemingly no way they can work and no Help to tell you anything about it!

        Thanks.

      • #740498

        I love having commands for which there is seemingly no way they can work and no Help to tell you anything about it!

        Thanks.

    • #740484

      This RunCommand instruction is not meant for use from within a “normal” Access session. You can’t turn the current database into an .mde programmatically, just like you can’t compact the current database in code. Instead, the instruction is intended for use in Automation, i.e. create an Access.Application object from an other application (VB6, Word, Excel, …). Even then, you must pass the arguments by issuing a SendKeys command, which is viewed with distrust by many.

      In the MS newsgroups, an “undocumented” feature is mentioned in connection with this:

      obj.SysCmd 603, ,

      where obj is an Access.Application object, for example (again, from another application)

      Dim obj As Access.Application
      Set obj = CreateObject(“Access.Application”)
      obj.SysCmd 603, “c:myapp.mdb”, “c:test.mde”

    Viewing 1 reply thread
    Reply To: Runcommand acCmdMakeMDEFile (Access 2000)

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

    Your information: