Arvin,
Thanks for the assistance, I appreciate it.
I have come from the IBM mainframe world to the realm of Windows, so
the
Registry is still somewhat of a mysterious animal to me. I plan to dig
into
it as I have never needed to add an entry to it until now.
Do you know where I could find an example of VBA code that calls Graham
Mandeno's function. I am not 100% clear about the fields that are
being
passed to it. Because of my lack of experience with the Registry, I am
a
bit
gun-shy to experiment without fully knowing what I am doing.
Thanks again
Brad
:
Here's some code that MVP Graham Mandeno wrote to create a Trusted
Location:
Public Function CreateTrustedLocation( _
Key As String, _
Path As String, _
Optional AllowSubfolders As Boolean, _
Optional Description As String, _
Optional Version As Integer = 12) As Boolean
Const cProcName = "CreateTrustedLocation"
Dim reg As New Registry, hk As Long
On Error GoTo ProcErr
With reg
hk = .OpenKey(HKEY_CURRENT_USER, _
"Software\Microsoft\Office\" & Version _
& ".0\Access\Security\Trusted Locations\" & Key, True)
.SetValue hk, "", "Path", Path
' Also try: .SetValue hk + 1, "", "Path", Path
.SetValue hk, "", "AllowSubfolders", IIf(AllowSubfolders, 1, 0)
.SetValue hk, "", "Description", Description
.CloseKey hk
End With
CreateTrustedLocation = True
ProcEnd:
On Error Resume Next
If hk <> 0 Then reg.CloseKey hk
Set reg = Nothing
Exit Function
ProcErr:
mb_Error cProcName
Resume ProcEnd
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
We are starting to roll out a new Access 2007 application to a
number
of
users who only have "Access 2007 Runtime" and not the full version
of
Access
2007.
The new application works fine, but each time a user opens up the
application they receive the message "A Potential Security Concern
Has
Been
Identified" .etc.
With the Runtime version it appears that we cannot simply add a
Trusted
Location on our users' PCs.
Is there an easy way to suppress this message or to add a Trusted
Location
via an alternative method?
Thanks,
Brad