• Access 2003 Runtime “Unsafe Expressions”

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access 2003 Runtime “Unsafe Expressions”

    Author
    Topic
    #462365

    I created an installation package using the Access 2003 Developer Extentions for using a runtime of Access on pc’s without Microsoft Access. All went well with the creation of the package. It also installed fine on the install when put on a pc without Microsoft Office. However, when opening it gets the infamous “Unsafe Expressions” window.

    Running as a runtime, the “Tools” menu option is not available, so it is not possible to edit the Macro properties and change the security settings.

    My searches have not produced anything, yet. Does anyone have experience creating 2003 Runtimes and a work around for the Unsafe Expressions issue?

    Thanks in advance for your ideas and solutions.

    Ken

    Viewing 0 reply threads
    Author
    Replies
    • #1176568

      I’ve been fighting a similar issue with 2007 – it’s even trickier, but I think this link How to set the macro security level in Access 2003 runtime may provide an answer for you. And I would choose the code approach rather than trying to hack the registry on each user PC.

      • #1176687

        I’ve been fighting a similar issue with 2007 – it’s even trickier, but I think this link How to set the macro security level in Access 2003 runtime may provide an answer for you. And I would choose the code approach rather than trying to hack the registry on each user PC.

        AWESOME! Thanks. I hope you can get your’s to go as smoothly.

        Ken

        • #1176701

          I spoke too soon. It works GREAT in an Access 2003 environment. However, it does not work in a runtime environment. I am not enough of a programmer to say for certain, so this is just conjecture on my part. I suspect that because the code is calling for items on the menu, and since the menu items do not exist in the runtime, that that is creating the problem.

          [codebox]’==============================================
          ‘ Sub: openSecurityDialog( )
          ‘ Author: Q-Built Solutions; http://www.QBuilt.com
          ‘ Date: 3 Aug. ’04

          ‘ Note: This sub requires the Microsoft Office 11.0 Library
          ‘ as a Reference.

          ‘ This sub activates the Macro -> Security submenu to open
          ‘ the Macro Security dialog window for the user who is using
          ‘ the runtime version of Access ’03 instead of the retail version,
          ‘ which may need to have the default security level changed in
          ‘ order to run the code in the modules.

          ‘ Thanks to Victor Escalera, we have the code needed for the
          ‘ Spanish version of Access, as well. To use the Spanish version
          ‘ just replace the lines marked “English version” with the lines
          ‘ marked “Espanol (Spanish version).” Thanks, Victor!
          ‘==============================================

          Public Sub openSecurityDialog( )

          On Error GoTo ErrHandler

          Dim CmdBar As CommandBar
          Dim CmdBarPopup As CommandBarPopup

          Set CmdBar = Application.CommandBars(“Menu Bar”)
          Set CmdBarPopup = CmdBar.Controls(“Tools”) ‘ English version.
          ‘Set CmdBarPopup = CmdBar.Controls(“Herramientas”) ‘ Espanol (Spanish version).
          Set CmdBarPopup = CmdBarPopup.Controls(“Macro”)
          CmdBarPopup.Controls(“Security…”).Execute ‘ English version.
          ‘CmdBarPopup.Controls(“Seguridad…”).Execute ‘ Espanol (Spanish version).

          CleanUp:

          Set CmdBarPopup = Nothing
          Set CmdBar = Nothing

          Exit Sub

          ErrHandler:

          MsgBox “Error in openSecurityDialog( )” & vbCrLf & _
          “in SecurityFunctions module.” & vbCrLf & vbCrLf & _
          “Error #” & Err.Number & vbCrLf & Err.Description
          Err.Clear
          GoTo CleanUp

          End Sub ‘ openSecurityDialog( )
          [/codebox]

          • #1176808

            I spoke too soon. It works GREAT in an Access 2003 environment. However, it does not work in a runtime environment. I am not enough of a programmer to say for certain, so this is just conjecture on my part. I suspect that because the code is calling for items on the menu, and since the menu items do not exist in the runtime, that that is creating the problem.

            ‘ Note: This sub requires the Microsoft Office 11.0 Library
            ‘ as a Reference.

            Did you check to make sure the Microsoft Office 11.0 library is referenced in your VBA project before you deploy it to a PC with the runtime? I’ve not tried this yet with 2007 where my problem lies, so I can’t vouch for the code, but it certainly seems to indicate that the code is intended to perform that security task in a runtime environment.

    Viewing 0 reply threads
    Reply To: Access 2003 Runtime “Unsafe Expressions”

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

    Your information: