Macro Security in Access ADE (Runtime only)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We distribute Access 2003 Projects with the Access 2003 runtime only. How can we avoid the security hints when no full product is installed and therefore the menu option Tools > Macros > Security is not available?

Is is possible to change the security setting by code?

Thanks,
Norbert Meiss
 
Hi Norbert,

Thanks for your post. According to your description, I understand that you
want to know if it is possible to change the security setting by code in
Access 2003 projects with Access 2003 runtime only. If I have
misunderstood, please feel free to let me know.

As far as I know, the security setting in Access projects (ADP or ADE) is
the setting of the SQL Server. The user accounts and permissions are
defined in the SQL Server. As such, you can use the client tools that are
included with the regular version of SQL Server or Microsoft Office XP
Developer for creating the application role and assigning it permissions.
In the full version of Access, you can still create the application role
and grant it the necessary permissions programmatically by using
Transact-SQL (T-SQL) from an ADP.

However, because you are unable to code in the runtime version of Access,
it seems impossible to change the security setting by code unless you
embedded some security code before distribution. Although a full discussion
of SQL Server Security is outside the scope of this article, additional
information can be found in <SQL Server Books Online> or in the following
article on the Microsoft MSDN Web site:
322712 Microsoft SQL Server 2000 SP3 Security Features and Best Practices
http://support.microsoft.com/?id=322712

For more information regarding this issue, please refer to the following
article.
308312 How to Use Application Roles with Access Projects and SQL Server 2000
http://support.microsoft.com/?id=308312

Thanks for posting in community.

Thank you,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Michael,

thanks for your fast reply. Our problem has nothing to do with SQL security but with Access Macro Security. When you open an Access 2003 MDB or ADP on a new Office 2003 installation the macro security level by default is set to a medium level. This means any time you open the file you get a warning in a dialog and you must confirm that you really want to open this file though it might be dangerous. In the MDB or ADP you then can set the macro security level to low which is not recommended but prevents the dialog to appear.

On a system where only the runtime version of Access 2003 is installed I do not have the change to change the macro security level - unless it can be done by code or kind of registry hack.

However I feel that it must be a documented procedure to overcome this problem. I cannot tell my customers that they ignore a warning every time they start our application.

Thanks,
Norbert Meiss
 
Hi Norbert,

Thanks your feedback. If I understand correctly that you want to change the
security level in the Access 2003 runtime. If I have misunderstood, please
feel free to let me know.

Based on my research, changing the following registry settings of the
following key should help you change the security level of the macro in
Access 2003.

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Security\Level

If the value is 1, then the macro security of Access 2003 is set to low.
If the value is 2, then the macro security of Access 2003 is set to medium.
If the value is 3, then the macro security of Access 2003 is set to high.

WARNING: If you use Registry Editor incorrectly, you may cause serious
problems that may require you to reinstall your operating system. Microsoft
cannot guarantee that you can solve problems that result from using
Registry Editor incorrectly. Use Registry Editor at your own risk.

Also, you can try to perform the following codes to call the security
dialog. Then you can set the security level manually in the runtime version
of Access 2003.

Dim CBarMenu As CommandBar
Dim CBarCtl As CommandBarPopup
Set CBarMenu = Application.CommandBars("Menu Bar")
Set CBarCtl = CBarMenu.Controls("Tools")
Set CBarCtl = CBarCtl.Controls("Macro")
CBarCtl.Controls("Security...").Execute

Note. Please make sure you selected the Microsoft Office Object Library in
the references

Please feel free to post in the group if this solves your problem or if you
would like further assistance on this issue.

Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top