Hi.
I have the database with front end, where some to time needs to be updated and passed to users. Instead asking them manually to copy i found macro which help to automate this process.
The issue i having is that macro creates a loop, it tries to open multiple front ends unless the "Security Warning" trusted (please see attached for warning).
It works fine if it's trusted and next time no issue, but still some users forgets to do it or not understand much about it.
Please see code I'm using:
What did I find out that it opens first access application/client after the actual file and in this case it can be open as many time you want. Tried to find the solution to open just from the directory, unlucky with out results
Is there actual way to avoid the macro trust messages? As much i know it can be done manually in application, but that isn't solution we have over 50 PCs and they constantly changing to new ones.
Thanks in advance, for any help!
I have the database with front end, where some to time needs to be updated and passed to users. Instead asking them manually to copy i found macro which help to automate this process.
The issue i having is that macro creates a loop, it tries to open multiple front ends unless the "Security Warning" trusted (please see attached for warning).
It works fine if it's trusted and next time no issue, but still some users forgets to do it or not understand much about it.
Please see code I'm using:
Code:
Private Sub Form_Timer()
On Error Resume Next
Dim strSource As String
Dim strMsg As String
Dim strOpenClient As String
Const q As String = """"
DoCmd.Hourglass True
DoEvents
Err.Clear
strSource = "W:\Database\Database.accdb"
strDest = "C:\Database\Database.accdb"
FileCopy strSource, strDest
DoEvents
strOpenClient = "MSAccess.exe " & q & strDest & q
Shell strOpenClient, vbNormalFocus
DoCmd.Hourglass False
DoCmd.Quit
End Sub

Is there actual way to avoid the macro trust messages? As much i know it can be done manually in application, but that isn't solution we have over 50 PCs and they constantly changing to new ones.
Thanks in advance, for any help!