Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Runcommand acCmdMakeMDEFile (Access 2000)

    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?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Runcommand acCmdMakeMDEFile (Access 2000)

    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, <mdb source>, <mde destination>

    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"

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Runcommand acCmdMakeMDEFile (Access 2000)

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

    Thanks.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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