Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371

    New Database Access Security warning

    Hi Guy's, i have written a new DB file and placed into a folder (shared folder on internal drive)

    I am using Application.FollowHyperlink to the path and file name but get the security warning, after searching a little, all points to Trust Center settings

    i can't seem to get past this ???


    As always, thank you

    Click image for larger version. 

Name:	Hol Cal Security.JPG 
Views:	28 
Size:	21.0 KB 
ID:	53216

    Is it better to set as an Object rather than follow hyperlink ?

    never had this problem

    When i click Yes, file opens fine

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    So is that a Trusted Location?
    How did you place it there?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Its a front end placed in a folder and backend placed where all others BE's are placed

    there are other FE's in the same folder, so is it Trusted locations issue ?

    TY

    FE Folder is Databases
    BE folder is Db Backend Folder

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    If the other FEs work, being in the same location, I would not have thought a trust issue.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Office 365
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    If you downloaded the BE or FE from parts unknown, check out the file property.

    Click image for larger version. 

Name:	unblock.png 
Views:	26 
Size:	68.0 KB 
ID:	53217

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Quote Originally Posted by davegri View Post
    If you downloaded the BE or FE from parts unknown, check out the file property.

    Click image for larger version. 

Name:	unblock.png 
Views:	26 
Size:	68.0 KB 
ID:	53217
    I thought of that, but thought Dave would just copy it within the network?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    try using a method other than followhyperlink and you won't get the message.

    Code:
    #If Win64 Then      'Public Dclare PtrSafe Function
      Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
      Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As Long
    #Else
      Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
      Private Declare Function GetDesktopWindow Lib "user32" () As Long
    #End If
    
    
    
    
    Const SW_SHOWNORMAL = 1
    Const SE_ERR_FNF = 2&
    Const SE_ERR_PNF = 3&
    Const SE_ERR_ACCESSDENIED = 5&
    Const SE_ERR_OOM = 8&
    Const SE_ERR_DLLNOTFOUND = 32&
    Const SE_ERR_SHARE = 26&
    Const SE_ERR_ASSOCINCOMPLETE = 27&
    Const SE_ERR_DDETIMEOUT = 28&
    Const SE_ERR_DDEFAIL = 29&
    Const SE_ERR_DDEBUSY = 30&
    Const SE_ERR_NOASSOC = 31&
    Const ERROR_BAD_FORMAT = 11&
    
    
    Public Sub OpenNativeApp(ByVal psDocName As String)
    Dim r As Long, msg As String
    
    
    r = StartDoc(psDocName)
    If r <= 32 Then
        'There was an error
        Select Case r
            Case SE_ERR_FNF
                msg = "File not found"
            Case SE_ERR_PNF
                msg = "Path not found"
            Case SE_ERR_ACCESSDENIED
                msg = "Access denied"
            Case SE_ERR_OOM
                msg = "Out of memory"
            Case SE_ERR_DLLNOTFOUND
                msg = "DLL not found"
            Case SE_ERR_SHARE
                msg = "A sharing violation occurred"
            Case SE_ERR_ASSOCINCOMPLETE
                msg = "Incomplete or invalid file association"
            Case SE_ERR_DDETIMEOUT
                msg = "DDE Time out"
            Case SE_ERR_DDEFAIL
                msg = "DDE transaction failed"
            Case SE_ERR_DDEBUSY
                msg = "DDE busy"
            Case SE_ERR_NOASSOC
                msg = "No association for file extension"
            Case ERROR_BAD_FORMAT
                msg = "Invalid EXE file or error in EXE image"
            Case Else
                msg = "Unknown error"
        End Select
    '    MsgBox msg
    End If
    End Sub
    
    
    Private Function StartDoc(psDocName As String) As Long
    
    
    Dim Scr_hDC As Long
    
    
    Scr_hDC = GetDesktopWindow()
    StartDoc = ShellExecute(Scr_hDC, "Open", psDocName, "", "C:", SW_SHOWNORMAL)
    End Function
    call it with
    Code:
    OpenNativeApp "Your url here"
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  8. #8
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Hi guys, thank you, it will open directly ok, just a command button from main DB to follow hyperlink

    @davegri, i can't find those properties, is it location folder properties ?

    @WGM I had copied the DB to the same location as other FE files

    @ moke123, would that function go into a global module or current module ?

    I normally use a macro to open DB's and call them Autoexec, guessing that's not the issue but i will try yoru suggestions

    Thank you indeed

  9. #9
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    @ davegri, noticed you said file properties, will find it

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Office 365
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    Quote Originally Posted by DMT Dave View Post
    @ davegri, noticed you said file properties, will find it
    Right click on the database file name in File Explorer.

  11. #11
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Quote Originally Posted by DMT Dave View Post
    @ davegri, noticed you said file properties, will find it
    Right click the file.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  12. #12
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    I think i am barking up the wrong tree

    Right click DB File/Properties

    these are the windows i get up

    Click image for larger version. 

Name:	1.JPG 
Views:	23 
Size:	32.0 KB 
ID:	53218

    Click image for larger version. 

Name:	2.JPG 
Views:	23 
Size:	35.6 KB 
ID:	53219

    Click image for larger version. 

Name:	3.JPG 
Views:	23 
Size:	29.9 KB 
ID:	53220

    I have tried looking for the optoin to disable the warning....

    Sorry if i am niaeve on this

  13. #13
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Office 365
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    In your first image, the option at the bottom doesn't show. That means the file is not seen as being downloaded from the internet, or it has already been approved.
    So the suggestion doesn't apply to that file.

  14. #14
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    I have tried a few things, perhaps try generating a new databse in the same folder, and import FE Objects from the one that won't play and Import linkd tables from BE

  15. #15
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    @ moke123, would that function go into a global module or current module ?
    A standard module. I tested it to be sure and it does not cause the warning that followhyperlink does.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-06-2022, 06:26 PM
  2. Replies: 2
    Last Post: 05-15-2016, 10:27 AM
  3. Replies: 8
    Last Post: 01-20-2015, 01:08 AM
  4. MS Access triggering Outlook Security warning
    By Amiga1200 in forum Programming
    Replies: 5
    Last Post: 05-22-2014, 11:24 PM
  5. Replies: 3
    Last Post: 11-20-2012, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums