protect a query

J

Jacqueline

Is there a way to password protect a query within a database? My users have
access to the majority of the database but there are a one or two reports run
from queries that only one person should have access.

Any ideas?
Thanks
Jacqueline
 
D

Dorian

There is no ponit in protecting a query. You need to protect the data - which
is in a table.
There is nothing to prevent someone creating another query to read the table
or even linking to the table from another database.
What version of Access are you using?
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
J

Jacqueline

In this case, the users don't have access to the tables, nor even the
knowledge on how to open them. All our data is linked from the CIS for our
state. I have to build all interfaces and reports for the users. One of my
users needs a report that does not need to be shared with others, however if
I place it out there someone could run it.

I was hopeing there was a way to protect either the report or the query? I'm
using 2007, not completly liking it but getting there...
Thanks
Jacqueline
 
D

Dale Fye

Are your users using an Access "application", or are they just opening your
Access database?

You can ensure that your users don't have access to the "query" by hiding
the navPane and only allowing them to perform functions form within your
forms. If you go this route, you should also uncheck the "Use Access Special
Keys", "Display Navigation Pane" and possibly some of the other options in
the Access Options (Current Database).

I generally have a list of reports that are available for use. I put these
in a table with a ReportName, ReportTitle and you could easily add another
field for ReportWho (normally this would be "All", but you could also enter
the persons UserId in this field). Then, in the query for the list, you
would use something like:

Select ReportName, ReportTitle
FROM tbl_Reports
WHERE ReportWho = "All" OR ReportWho = fOSUserName()

You would also have to add the function fOSUserName (which you can get from
http://www.mvps.org/access/api/api0008.htm) to your database.
 
J

Jacqueline

Thanks Dale, this sounds like just what I need. Yes, my folks do use Access
2007. I actually have them drop a copy of the db on their desk top and have
everything linked back to our CIS.

They are mostly afraid of the db, and some do not even realize it is a db. I
have everthing they need either in forms or reports that they access through
various buttons.

Though I doubt they would ever venture into the tables, I like the idea of
locking the task bar, and had not thought of that. Thanks for the info, I
will play with it see what I can do.
Jacqueline
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top