Forum Discussion
Pieceguy
May 05, 2025Copper Contributor
Block users from exporting queries and tables
First off apologies very new to access and databases in general, but I am having an issue where users can just grab my queries/tables out of my access database with excel. I'd like to know how I can prevent it.
Current things I have tried.
Shift bypass disabled
Forced into runtime via script
Split the database and encrypted the back end
Saved as an accde
Hidden the tables/queries
No matter what else I try a user can just open excel click get data and has a free pass to copy everything.
Is there anyway to stop them from pulling the tables/queries out?
6 Replies
Sort By
And when you have spend hours and days on "securing" the database, the users just select the records of a form and copy-paste them into Excel ...
- MendipDataSystemsCopper Contributor
LOL.
Of course it’s also possible to block those actions! 😏However, this again raises the point that no Access database can ever be made 100% secure. If you block one ‘back door’, determined users will search for another weakness. Security is only as strong as its weakest part.
- MendipDataSystemsCopper Contributor
Agree with all the previous comments. Although you cannot make Access totally secure, it is possible to prevent misuse by all except experienced hackers. However, what exactly are you are trying to protect and why?
As well as the suggestions already made, there are many things you can do to make it harder for anyone to steal your data. My article (linked by George_Hepworth) gives many suggestions
You can certainly load form & report data in code as arnel_gp suggests but record sources can be read externally so that isn't secure either. A more secure alternative is to use disconnected ADO recordsets for your forms instead. That option isn't available for reports though workarounds are possible.
I would definitely password protect & thereby encrypt your Access front-end database.
In addition, consider:
a) 'deep hiding' your tables- this makes them invisible in the navigation pane and so not available to users from Excel. Unfortunately, that isn't possible with queries
b) encrypting your data as well so that even if anyone does gain access to your tables / queries, the data will be unreadable
- arnel_gpSteel Contributor
make sure you use forms and reports on displaying your data.
you assign the RecordSource of the forms/Reports on the Load event, eg:
For report Private Sub Report_Open(Cancel As Integer) Me.RecordSource = "SELECT * FROM (SELECT * FROM [" & BEPath & "\BEName.accdb;PWD=BEpassword].yourTableName);" End Sub for form: Private Sub Form_Load() Me.RecordSource = "SELECT * FROM (SELECT * FROM [" & BEPath & "\BEName.accdb;PWD=BEpassword].yourTableName);" End Sub
therefore, you can delete the queries and Linked tables from your Front End.
Hi,
George already wrote that there are only limited means if you use an Access backend.
> encrypted the back end
If you have used a database password for the backend file then there is no "free pass" anymore to the data. A user who tries to connect from Excel to the data in the backend will be asked for the database password.
To exclude external intruders you have to close the file chain as described in our beautiful video here.
Servus
Karl
****************
Access Forever News DevCon
Access-Entwickler-Konferenz AEK- George_HepworthSilver Contributor
The short, over simplified answer is no. That's the nature of Access. It is inherently not secure. While you can push it towards a greater relative degree of security with some of the techniques you mention, there is simply no way to get to 100% secure.
One of the more comprehensive sources on Access security I am aware of is this one, Isladogs on Access -- Access Security You will glean some useful information relating to your efforts.
If you are really concerned about your users misusing the data, perhaps you could approach management to discuss why you don't trust other users in your organization and what options are available to deal with that problem on a management level.
Also, if the data really must be protected 100% from unauthorized access -- even by colleagues who otherwise use that same data via Access -- you might need to migrate the data to a more secure platform such as SQL Server.
.