VBA for enable contents

mounty76

Registered User.
Local time
Today, 10:31
Joined
Sep 14, 2017
Messages
345
Hello!!

I have a DB that is on a server, when it opens I have to click on enable content every time, I've looked in the trust center settings and none of the changes in here makes a difference.

I have an AutoExec file that runs but obviously I get an error as I need to enable content.

Is there anyway to by pass 'enable content' with VBA or any simple suggestions/examples for error handling on this? Every thing I've seen on error handling seems quite complicated!

Thanks in advance!
 
In the trust center you should be able to add the db's location in Trusted Locations.
 
if your db is on a server you need to tick the 'allow trusted location on my network' option before selecting the folder where your db is located
 
Is there anyway to by pass 'enable content' with VBA
Unfortunately, that's a catch-22. You can't execute something that hasn't been trusted yet, so any code to trust itself won't run at all.
or any simple suggestions/examples for error handling on this?
The Autoexec macro should still run whether the app is trusted or not. So, you should be able to use If CurrentProject.IsTrusted as a check or error handler when the app starts.
 
i don't think it will.
As far as I know it does, but I guess someone else could let us know. I think that's the reason why there is a CurrentProject.IsTrusted If condition available.
 
Hi All, Thanks for this, it wouldn't allow me to add a folder as a trusted location, it just says it cannot add it as a trusted location for security reasons. I changed the ActiveXsetting to enable all controls and in Macro Settings I enabled all macros. This has worked but obviously not ideal?
 
Hi All, Thanks for this, it wouldn't allow me to add a folder as a trusted location, it just says it cannot add it as a trusted location for security reasons. I changed the ActiveXsetting to enable all controls and in Macro Settings I enabled all macros. This has worked but obviously not ideal?
Some folders are not supposed to be accessible to users; i.e. those in which protected system files are located. Note response #3 regarding network locations as well.
 

Users who are viewing this thread

Back
Top Bottom