Solved

Ms Access prevent queries from being exported

Posted on 2014-01-15
3
359 Views
Last Modified: 2014-02-05
I have an access app that i have compiled to remove the code.  however the passthrough queries are still visible if i attempt to import them from another access app.  Is there a way to prevent the query and table objects from being exported?
0
Comment
Question by:RDLFC
3 Comments
 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
ID: 39783216
What I have done in the past is to set the properties of each of these to hidden. They are not then visible under normal settings (unless you choose to display hidden objects). They then will not appear in the list of objects that can be exported. There is not real way of preventing this totally although using an accde does make it harder as the user will not be able to change the setting to view hidden objects.


Kelvin
0
 
LVL 84
ID: 39785139
I don't think you can do this with .accdb files. The older .mdb format allowed you to implement User Level Security, and you could remove certain permissions that would handle situations like this, but with .accdb files that's not available.

You could add a Database Password to the file, and a user would need to know that password in order to open the database. Many times the developer will use a "launcher" application to open their password-protected database. The "launcher" app can be another access database the user opens, and then the launcher will actually open the password-protected database. This way, the user doesn't need to know the password:

Dim acc As Access.Application
Set acc = New Access.Application
acc.Visible = True

Dim dbs as DAO.Database
Set dbs = acc.DBEngine.OpenDatabase("full path to your database", False, False, "PWD=YourPassword")
acc.OpenCurrentDatabase "full path to your database"

dbs.Close
Set dbs = Nothing

Open in new window

Code poached from here: http://support.microsoft.com/kb/235422

So your user would open the "launcher" app, and then the "launcher" app would run the code above to open your database. You could do this in the Open or Load event of a form to do things in an automated manner, or you could do this in the Click event of a button.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39789957
My guess is that what Scott posted will get you what you want,

You also need to ultimately consider your need for this.

Are you just trying t stop a casual user from clicking "Export"
Or are you trying to "Harden" the data from a determined hacker...
...or some other scenario?

The general rule is that "if they can see it, they can steal it.
 vba automation, SQL Insert queries, Screeenshots, screenscrapers, copy/paste, cameras, even brute force memorization are all possible at some level,

"Is there a way to prevent the query and table objects from being exported? "
Well, if a user is already "in" the database, then they can use any number of technique to export it out...

I may have misunderstood your question here, so these are just some other things to consider.

;-)

JeffCoachman
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Correct ordering 16 44
Autocomplete textbox in MS Access 2016 4 20
Access MDB/PDF 21 32
Pass Form Control to VBA Function 2 19
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now