Security Warning (1 Viewer)

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
Hi , i hope you are all fine.
I wonder if there is a way to deal with the Access Security Warning message during the opning the Access, it shows this message: Security Warning, certain content in the database has been disabled.
I know how to deal with it manually, but i wich if there's a VBA way to deal with this issue or to pass it.

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:03
Joined
Oct 29, 2018
Messages
21,358
Hi. Are you opening a ACCDE or ACCDR file? If not, can you post a screenshot of the warning message?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:03
Joined
Feb 19, 2013
Messages
16,553
the whole idea is to warn users their computer may be at risk if they run the code. You can trust it by clicking the button, or you can put the file in a trusted location - if you want you can make your whole c drive and sub directories trusted, but I wouldn't recommend that. To set a new trusted location, in access, go to file>options>trust center>trust center settings>trusted locations>add a new location

trusted locations are stored in the registry and you can write code in an install program to modify the registry before the app is opened for the first time. How you do that depends on the install program. Some are free, some aren't. and if your users are corporate it is possible IT will have disabled the ability of users to modify the registry.
 

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
Hi. Are you opening a ACCDE or ACCDR file? If not, can you post a screenshot of the warning message?
Okay, as i said, i know how to deal with it manually, but need for vba code, because if i send an Access application to one of my client, and this one has that message security warning, he will not how to use my application and at that time i have to visit him to fix the problem manually, No , i wish with my Application code have a code to do that directly . I hope i exlpain good.
 

Attachments

  • IMG_20200513_224645.jpg
    IMG_20200513_224645.jpg
    598.4 KB · Views: 114

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
the whole idea is to warn users their computer may be at risk if they run the code. You can trust it by clicking the button, or you can put the file in a trusted location - if you want you can make your whole c drive and sub directories trusted, but I wouldn't recommend that. To set a new trusted location, in access, go to file>options>trust center>trust center settings>trusted locations>add a new location

trusted locations are stored in the registry and you can write code in an install program to modify the registry before the app is opened for the first time. How you do that depends on the install program. Some are free, some aren't. and if your users are corporate it is possible IT will have disabled the ability of users to modify the registry.
Okay, as i said, i know how to deal with it manually, but need for vba code, because if i send an Access application to one of my client, and this one has that message security warning, he will not how to use my application and at that time i have to visit him to fix the problem manually, No , i wish with my Application code have a code to do that directly . I hope i exlpain good
 

Micron

AWF VIP
Local time
Today, 04:03
Joined
Oct 20, 2018
Messages
3,476
If you're selling software, you ought to be using an installer that takes care of this?
Or you should be providing instructions on how to install?
Think of what you're asking - for Access to run code to trust code.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:03
Joined
Oct 29, 2018
Messages
21,358
Okay, as i said, i know how to deal with it manually, but need for vba code, because if i send an Access application to one of my client, and this one has that message security warning, he will not how to use my application and at that time i have to visit him to fix the problem manually, No , i wish with my Application code have a code to do that directly . I hope i exlpain good.
Hi. Just curious, looking at the screenshot you posted, are you using Access 2007?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:03
Joined
Feb 19, 2013
Messages
16,553
No , i wish with my Application code have a code to do that directly
as already explained, it can't be done. The code won't run until the user trusts the application - by which time it is too late. Use an installer or provide detailed instructions or use a video link such as teamviewer so you can install it remotely.

Your instruction could be for the user to install in the default trusted location e.g.
C:\Program Files (x86)\Microsoft Office\Office14\ACCWIZ\

this will vary depending on the bitness and version of access the client is using so probably not worth the effort
 

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
Hi. Just curious, looking at the screenshot you posted, are you using Access 2007?
Yes, i have to, cause most of people in my country still use 2007 and don't want to change it by the newer versions, so i have to use it to not fall in the problem of app not working, you know, if i code using 2010 or 2013, they will not work in 2007.
 

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
as already explained, it can't be done. The code won't run until the user trusts the application - by which time it is too late. Use an installer or provide detailed instructions or use a video link such as teamviewer so you can install it remotely.

Your instruction could be for the user to install in the default trusted location e.g.
C:\Program Files (x86)\Microsoft Office\Office14\ACCWIZ\

this will vary depending on the bitness and version of access the client is using so probably not worth the effort
Thanks for your time, i understand your point, i'll use your approche.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:03
Joined
Oct 29, 2018
Messages
21,358
Yes, i have to, cause most of people in my country still use 2007 and don't want to change it by the newer versions, so i have to use it to not fall in the problem of app not working, you know, if i code using 2010 or 2013, they will not work in 2007.
Hi. I completely understand. Looks like you have a plan of action now. It sounds good. Good luck!
 

Isaac

Lifelong Learner
Local time
Today, 01:03
Joined
Mar 14, 2017
Messages
8,738
In the past I have used a VBScript as the 'install shortcut', to open the user's access FE - after first checking registry.
 

Megaduck

Member
Local time
Today, 04:03
Joined
Apr 24, 2020
Messages
30
Hi , i hope you are all fine.
I wonder if there is a way to deal with the Access Security Warning message during the opning the Access, it shows this message: Security Warning, certain content in the database has been disabled.
I know how to deal with it manually, but i wich if there's a VBA way to deal with this issue or to pass it.

Thanks

What I did for this issue was put the AddPath.exe in the same folder as the FE database and create a desktop shortcut, having users open it before they open the database itself. You can download that here: https://www.accessribbon.de/en/?Trust_Center:Trusted_Locations

This adds the necessary registry entries (the exe has to be in the same folder you wish to add to the registry as a trusted location).

Not sure if this will help you, but may give you some ideas anyways.
 

mester

Member
Local time
Today, 09:03
Joined
Apr 2, 2020
Messages
63
What I did for this issue was put the AddPath.exe in the same folder as the FE database and create a desktop shortcut, having users open it before they open the database itself. You can download that here: https://www.accessribbon.de/en/?Trust_Center:Trusted_Locations

This adds the necessary registry entries (the exe has to be in the same folder you wish to add to the registry as a trusted location).

Not sure if this will help you, but may give you some ideas anyways.
It seems good, i'll try it ,thanks for your help
 

Users who are viewing this thread

Top Bottom