[AccessD] No Macro--> Security

MartyConnelly martyconnelly at shaw.ca
Mon Feb 20 23:11:51 CST 2006


Some other ways around this.

To avoid the security message you have to set the security level outside 
of Access before opening the database.
You can create a VB script file with this code and start your app using 
this. (Code is from an MS article)
http://support.microsoft.com/?kbid=235422

Const cDatabaseToOpen = "C:\<FileToOpen>.mdb"

On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application")
If AcApp.Version >= 10 Then
     AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
End If
AcApp.Visible = True
AcApp.OpenCurrentDatabase cDatabaseToOpen
If AcApp.CurrentProject.FullName <> "" Then
     AcApp.UserControl = True
Else
     AcApp.Quit
     MsgBox "Failed to open '" & cDatabaseToOpen  & "'."
End If

Pete
A couple of other ways around this.

Get your network guy to change the following registry settings of the
following key, should help you change the security level of the macro in 
Access 2003. He should be able to change this globally across the 
network for each client PC, there is even a way to do this from Access 
VBA code using WMI with proper network permissions.

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.


Or

You could also put this vbs code in a file to execute in a user's 
shortcut. Just create vbs file and add to desktop shortcut.

MyMDB.vbs

Const cDatabaseToOpen = "C:\<FileToOpen>.mdb"

On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application.11")
If AcApp.Version >= 11 Then
     AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
End If
AcApp.Visible = True
AcApp.OpenCurrentDatabase cDatabaseToOpen
If AcApp.CurrentProject.FullName <> "" Then
     AcApp.UserControl = True
Else
     AcApp.Quit
     MsgBox "Failed to open '" & cDatabaseToOpen  & "'."
End If

Rocky Smolin - Beach Access Software wrote:

>Bill:
>
>Thanks. That looks like it. Will forward to the client.
>
>Rocky
>
>
>Bill Patten wrote:
>  
>
>>I'm running out the door so didn't edit this from my personal tech tips, but 
>>I believe the information you need is here.
>>
>>Bill
>>To turn off or change security (macro blocking) go to tools/macro/security 
>>and set.
>>If the security tab is not there then you must go to customize and  set it 
>>up/
>>
>>tools/customize/commands then rearrange commands then in the menu bar drop 
>>down find tools!Macro and select Then select add find security and double 
>>click. Move to where you want it and  say OK
>>from MS Help
>>Change the security level for macro virus protection
>>Show All
>>Hide All
>>Security  Because macros can contain viruses, be careful about running them. 
>>Take the following precautions: run up-to-date antivirus software on your 
>>computer; set your macro security level to high; clear the Trust all 
>>installed add-ins and templates check box; use digital signatures; maintain 
>>a list of trusted publishers.
>>
>>On the Tools menu, point to Macro, and then click Security. If you do not 
>>see the Macro menu item under the Tools menu, or the Security menu item 
>>under the Macro menu, click the arrows at the bottom of a drop-down menu to 
>>display the hidden menu items.
>>Tip   If you want to see all menu items by default, on the Tools menu, click 
>>Customize, click the Options tab, and select the Always show full menus 
>>check box.
>>
>>I still can't see the Security command under the Macro menu
>>
>>On the Tools menu, click Customize, and then click the Commands tab.
>>Click Rearrange Commands, select Menu Bar, and in the Menu Bar box, click 
>>Tools | Macro.
>>In the Controls section, click Add.
>>The Add command dialog box will appear.
>>
>>In the Categories box, click Tools, and then in the Commands box, click 
>>Security.
>>The Security command will appear in the Controls box.
>>
>>Use the Move Up and Move Down buttons to position the Security command where 
>>you want.
>>If you'd like to position the Security command in its own group (between 
>>horizontal lines), with Security selected, click Modify Selection and click 
>>Begin a Group. Select the menu item below the Security command, and repeat.
>>
>>Click Close twice.
>>
>>
>>
>>Key Words
>>access 2003 security macro
>>
>>----- Original Message ----- 
>>From: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com>
>>To: "Access Developers discussion and problem solving" 
>><accessd at databaseadvisors.com>
>>Sent: Monday, February 20, 2006 4:12 PM
>>Subject: [AccessD] No Macro--> Security
>>
>>
>>Dear List:
>>
>>My user has four machines - one designated 'server' for the back end,
>>three 'clients'.  He Put the back end of the app I developed on the
>>server, and a copy of the front end on the three clients.  Two work OK
>>after he got the security warning and went Tools --> Macro --> Security
>>and lowered the security.  But on the third machine there's no
>>'Security' choice on the Macro sub menu.  Not even grayed out.
>>
>>Anyone seen this before and know how to fix it? (I have but I can't
>>remember because I'm old and forgetful).
>>
>>MTIA
>>
>>Rocky
>>
>>  
>>    
>>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list