none
Run an Access 2007 App with Access 2013 Runtime RRS feed

  • Question

  • Hi Compadres,

    Wondering if this should work seems like I've done it countless times before but I just ran across a situation where I installed A2013 Runtime on a PC with NO other MS office products installed. Placed an .accde file that works on other PC's.

    When you click the App to run, you get the popup do you want to allow..., click yes and the file opens and the AutoExec fires, opening the Form and hiding the Ribbon etc. Then a popup says a Macro cannot run error####. When you click stop all Macros, the db shuts down. As an additional test, I placed an .accdb file which opens and promptly closes without any message.

    Thanks for any knowledge you can share in this matter!!!


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Monday, July 20, 2015 10:04 PM

Answers

  • Hi Chris,

    When using the runtime, it's not necessary to hide the ribbon because it's automatically done for you unless you're using custom ribbons. Also, make sue you have a robust error handling because the runtime would just quit on you if you don't have error handling in your code. Hope that helps...

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Monday, July 20, 2015 10:09 PM
  • Hi Chris,

    Check if you use a reference to Office 15. This is often needed for the Ribbon.Invalidate if you use custom ribbons. i have seen situations where MSO.dll ? does not install with the runtime.


    Brian, ProcessIT- Hawke`s Bay, New Zealand

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Monday, July 20, 2015 10:19 PM
  • >>>How can I code when someone opens the file if the Runtime vs. Access is opening the file, whether to run the Macro?

    If you may have the need to determine whether your user is using the full blown version of MS Access or the runtime version.
    A simple IF statement can determine this for you, as shown below.

    If SysCmd(acSysCmdRuntime) = False Then
        'The user is using a full blown version of MS Access      
    Else
        'The user is using the runtime version of MS Access
    End If

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Tuesday, July 21, 2015 9:16 AM

All replies

  • Hi Chris,

    When using the runtime, it's not necessary to hide the ribbon because it's automatically done for you unless you're using custom ribbons. Also, make sue you have a robust error handling because the runtime would just quit on you if you don't have error handling in your code. Hope that helps...

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Monday, July 20, 2015 10:09 PM
  • Hi Chris,

    Check if you use a reference to Office 15. This is often needed for the Ribbon.Invalidate if you use custom ribbons. i have seen situations where MSO.dll ? does not install with the runtime.


    Brian, ProcessIT- Hawke`s Bay, New Zealand

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Monday, July 20, 2015 10:19 PM
  • Hi db Guy & ProcessIT,

    It makes perfect sense now I think.

    When someone doesn't have Access installed it is fine not to have the AutoExec and use the selected startup Form, but when someone does have Access installed The Macro needs to be there to protect the file (from the honest users). How can I code when someone opens the file if the Runtime vs. Access is opening the file, whether to run the Macro? Or how to set the arguments of the Macro to determine what is opening it and act accordingly.

    To run or not to run the Macro, that is the question...

    Thank you!!!


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Tuesday, July 21, 2015 1:33 AM
  • Hi Chris,

    Just build a custom ribbon with Start from Scratch = true and use that for all situations...


    Brian, ProcessIT- Hawke`s Bay, New Zealand

    Tuesday, July 21, 2015 1:52 AM
  • Hi,

    I normally deploy compiled versions of the application with the ACCDR extension, so I don't usually bother with hiding the menus. Plus I also deploy with custom ribbons, so they only get what I designed for them to use. But you can use the SysCmd(acRuntime), or something like that, to check if the user is running a runtime or full version.

    Hope that helps... Sent from phone...

    Tuesday, July 21, 2015 3:36 AM
  • >>>How can I code when someone opens the file if the Runtime vs. Access is opening the file, whether to run the Macro?

    If you may have the need to determine whether your user is using the full blown version of MS Access or the runtime version.
    A simple IF statement can determine this for you, as shown below.

    If SysCmd(acSysCmdRuntime) = False Then
        'The user is using a full blown version of MS Access      
    Else
        'The user is using the runtime version of MS Access
    End If

    • Marked as answer by KCDW Tuesday, July 28, 2015 1:10 PM
    Tuesday, July 21, 2015 9:16 AM
  • >>>How can I code when someone opens the file if the Runtime vs. Access is opening the file, whether to run the Macro?

    If you may have the need to determine whether your user is using the full blown version of MS Access or the runtime version.
    A simple IF statement can determine this for you, as shown below.

    If SysCmd(acSysCmdRuntime) = False Then
        'The user is using a full blown version of MS Access      
    Else
        'The user is using the runtime version of MS Access
    End If

    Thanks Db Guy, ProcessIT & David.

    David,

    Is the On Open Event of the Startup Form the best place for that code or would it be better to call it from the Auto Exec?

    Thank you!!!


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Thursday, July 23, 2015 3:14 PM
  • >>>Is the On Open Event of the Startup Form the best place for that code or would it be better to call it from the Auto Exec?

    An AutoExec macro (a macro that you name AutoExec) runs before any other macros or modules in the database, and the Open event occurs when a form is opened, but before the first record is displayed.

    The On Open Event of the Startup Form the best place for that code or would it be better to call it from the Auto Exec, I think which would be better base on your requirement.

    Tuesday, July 28, 2015 8:27 AM