I don't want the message of "Enable contents" (1 Viewer)

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
Hi,

I have created small program and secured it my right click, hiding all menus, and navigation. Also to use AutoExec Macro to open form and when form loaded it secure/hides menus etc etc.

But when I emailed to my friend then it showing option for "enable contents" and all the navigation option and menus are there.

Any way to prevent this also when I email copy of program this message never shown on his computer.

Any solution?
 

Ranman256

Well-known member
Local time
Today, 05:48
Joined
Apr 9, 2015
Messages
4,337
EVERY person has a different Access on their PC.
Everyone MUST enable macros for strange databases.
Once set, they wont get the message again.

the macros need enabled for each user:
File, options, trust center, trust center settings, macro settings, ENABLE ALL MACROS
 

isladogs

MVP / VIP
Local time
Today, 10:48
Joined
Jan 14, 2017
Messages
18,211
Ranman is correct in stating that macros and ActiveX controls are disabled when the security bar with the Enable Content button is shown. This is for user protection as both macros and ActiveX controls can contain malicious code.

For that reason, it is a VERY BAD idea to enable all macros as he suggests. The setting will apply globally to all databases and expose the user to potential risk.

I would strongly recommend you do NOT follow that advice. A better setting for macros is 'Disable all macros with notifications'

Your end user has two safe options for your files
1. Approve individual files from you.
2. Place all files from you in the same folder or subfolder and make that a trusted location in the Trust Center

There is a further solution which involves distributing a file to edit the registry direct ...but many organisations block such changes and your clients may be unhappy even if it's not blocked

Note that both 1 & 2 above also change the registry settings
 

Cronk

Registered User.
Local time
Today, 19:48
Joined
Jul 4, 2013
Messages
2,772
Another option is to make only the folder containing the database a Trusted Location.


With Access open,

Code:
File | Options | Trust Center | Trust Center Settings | Trusted Locations | Add New Location


Then warn the user not to put anything else in that folder.
 

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
So is there any way so that I can hide all tables, forms quires etc using vba so it can't be shown on other computer even macro is not enabled?
 

Beetle

Duly Registered Boozer
Local time
Today, 03:48
Joined
Apr 30, 2011
Messages
1,808
You could send the user a accde copy (or mde if it's an older version of Access). As long as you have the navigation pane hidden and all the other properties set in the master copy before you create the accde then the user won't be able to see anything other than what you want them to see, whether the file is in a trusted location or not. The potential problem with this is that if the user is running this a split application on their PC (which they really should be), then you would have to have their correct back end path in the accde before you send it to them because they won't be able to relink. You could do this via code using CurrentProject.Path, but the user would need to store the back end file in the same folder as the front end. Better than running an unsplit application, but still not necessarily ideal. Another higher level solution would be to write code so that the user could, through a form in your application, choose the location they want for the back end.
 

isladogs

MVP / VIP
Local time
Today, 10:48
Joined
Jan 14, 2017
Messages
18,211
You could send the user a accde copy (or mde if it's an older version of Access). As long as you have the navigation pane hidden and all the other properties set in the master copy before you create the accde then the user won't be able to see anything other than what you want them to see, whether the file is in a trusted location or not. The potential problem with this is that if the user is running this a split application on their PC (which they really should be), then you would have to have their correct back end path in the accde before you send it to them because they won't be able to relink. You could do this via code using CurrentProject.Path, but the user would need to store the back end file in the same folder as the front end. Better than running an unsplit application, but still not necessarily ideal. Another higher level solution would be to write code so that the user could, through a form in your application, choose the location they want for the back end.

I agree with everything Beetle wrote above.

My own approach is to distribute apps as ACCDE files with the navigation pane & ribbon hidden to standard users. The backend is normally password protected. Both are distributed as EXE files created by a professional installer package.

The path to the FE is specified by the installer and this is made a trusted location using a registry script (see my first reply).
Program admins set the BE path during the initial setup and this info is also stored in the registry for use during any later version updates.

Its safe, secure and totally reliable

FWIW my apps do not contain macros (except autoexec on occasion) & I only rarely use an ActiveX control - an exception is the use of an ActiveX slider control in one app. I use code to inform any clients who disable macros completely and the control is then disabled. At some point I intend to replace that control completely if it becomes an issue
 

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
Another option is to make only the folder containing the database a Trusted Location.


With Access open,

Code:
File | Options | Trust Center | Trust Center Settings | Trusted Locations | Add New Location


Then warn the user not to put anything else in that folder.


Thanks for your reply. I don't how can i set a location. If a trusted location is set then user is only able to run program from this location? if user don't place program on that folder then what happens?
 

isladogs

MVP / VIP
Local time
Today, 10:48
Joined
Jan 14, 2017
Messages
18,211
Thanks for your reply. I don't how can i set a location. If a trusted location is set then user is only able to run program from this location? if user don't place program on that folder then what happens?

I'll answer as cronk is offline

Follow the steps shown in cronk's post. Select the folder where the files will be stored and optionally include subfolders as well.
All databases stored in that folder will be automatically trusted.
If a database is placed in or moved to a non trusted location, it will again show the security banner...UNLESS the database was individually approved by clicking the enable content button.

Hth
 

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
I'll answer as cronk is offline

Follow the steps shown in cronk's post. Select the folder where the files will be stored and optionally include subfolders as well.
All databases stored in that folder will be automatically trusted.
If a database is placed in or moved to a non trusted location, it will again show the security banner...UNLESS the database was individually approved by clicking the enable content button.

Hth

Thanks Ridder,

I saw a program which runs on full screen, someone shared with me here that contains the password for shift key bypass as "ridders". The program runs on full screen and never asked me for enable contents.
 

isladogs

MVP / VIP
Local time
Today, 10:48
Joined
Jan 14, 2017
Messages
18,211
Thanks Ridder,

I saw a program which runs on full screen, someone shared with me here that contains the password for shift key bypass as "ridders". The program runs on full screen and never asked me for enable contents.

Doesn't give me a lot to go on.....however unless others are using my username as a password which I doubt, it must be one of mine.
Possibly the kiosk style demo database from this thread https://www.access-programmers.co.uk/forums/showthread.php?t=294135
If so, perhaps they had applied the password to disable the shift bypass before sharing it with you????
Have a look at the original version in the link and let me know if there's a problem. For info, it was intended as a work in progress rather than the final version. But it never got completed...
 

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
Yes Exactly, This is the program I am talking about. When I downloaded it and run it, It never asks for enable contents.

However this giving error of Hidden module while I try to use the modules in my program.
 

isladogs

MVP / VIP
Local time
Today, 10:48
Joined
Jan 14, 2017
Messages
18,211
Sorry - misread your previous comment - thought you were asking about disabling the shift bypass with the password

You have saved it to a trusted location so it doesn't show the Enable Contents button.
If you MOVE it to an untrusted location e.g. windows desktop(?), it WILL show the security bar and EnableContents button.
I've just downloaded it from that link to check.

However this giving error of Hidden module while I try to use the modules in my program.

Sorry - no idea what you mean.

I would be interested in your opinion of that LockDatabase app and the other info supplied with it. There is a later version with additional functionality (i.e. even more locked down) but I can't remember whether I uploaded it

However if you want to discuss that app in any more detail I suggest you start a new thread to do so
 

rehanemis

Registered User.
Local time
Today, 13:48
Joined
Apr 7, 2014
Messages
195
Yes sure I want discuss more about it and will open new thread.
 

Users who are viewing this thread

Top Bottom