Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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
    Attached Images Attached Images

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    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.
    Wendell

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    [quote name='WendellB' post='792448' date='07-Sep-2009 14:58']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.[/quote]
    AWESOME! Thanks. I hope you can get your's to go as smoothly.

    Ken

  4. #4
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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; 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]

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='kwvh' post='792595' date='08-Sep-2009 15:19']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.[/quote]
    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.
    Wendell

Posting Permissions

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