Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database security - data restriction

Status
Not open for further replies.
Jul 6, 2005
52
GB
I have a database that contains sales data from various countries around the world. I would like to restrict the countries that individual users can view the data of, i.e. the country manager for Germany can only see Germany sales data and not say, France.

Can anyone guide me as to how I would approach this problem?
 
If the users have no Access skills then you could drive all the forms and reports from queries which select data for that particular country.

If you've got people who know how to get to the Database Window and open tables then I would create separate databases for each country and build myself an administrator's database which linked in all the tables from the separate country for reporting and maintenance.

Geoff Franklin
 
The first option is more viable but it would mean having a separate query for every country (over 70) for every report and setting the permissions for each one. I was hoping there was an easier solution. Thanks anyway.
 
The first option is more viable but it would mean having a separate query for every country (over 70) for every report

I'm sure you could drive this from a lookup table of some sort. We have a similar problem here where each of the three offices only needs to see their own clients. I've got one query for each report but I add that office's filter to it as it runs.

Geoff Franklin
 
I have three generic security recommendations:

a) absolutely none

b) casual security - grab their Windows username via code and use this 'identity' to determine their security. This heavily relies on the honor system.

c) good security - don't store your data in Access, period, period, period. If your data is valuable, then they'll be willing to pay money to secure that data, right?


In your case I'm leaning towards option b). You can make a lookup table that determines their country (or whatever you're filtering) based on their username. Of course this means new users would have to be "set up" in the system, else they couldn't see any countries.
 
Actually you've given me an idea which is a variation of (b). Users will have to access the database via a username and password. The username is stored in a permanently open hidden form and the value used as a criterion for the queries. Hopefully that's not too simplistic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top