By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,914 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,914 IT Pros & Developers. It's quick & easy.

checkbox query

P: n/a
I am trying to create a time tracking database that allows an "admin"
to grant user permissions. When a new user is entered into the
database, their first and last name are entered. Then below, via
checkbox, they are givin Read, Write, Delete, Create permissions. All
these criteria are selected for 3 different departments.

department1read, department1write, department1delete, department1create
department2read, department2write, department2delete, department2create
department2read, department2write, department2delete, department2create
When I go to create an assignment, I enter all the information
in...Name, description, etc. I also, again via checkbox, select which
departments can view this assignment

department1view
department2view
department3view

Lets use department2 as an example. Now if I have a list off all the
assignments to be done, with their corresponding view permissions, how
would I write the query so only those show up whos user permissions
allow them to view department2 and the assignment allows
department2view.

But, if someone does not have "department2read" checked, they cannot
view these.

Does this make sense?

Brad

Apr 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Drum2001" <dr******@gmail.com> wrote in message
news:11*********************@t31g2000cwb.googlegro ups.com...
I am trying to create a time tracking database that allows an "admin"
to grant user permissions. When a new user is entered into the
database, their first and last name are entered. Then below, via
checkbox, they are givin Read, Write, Delete, Create permissions. All
these criteria are selected for 3 different departments.

department1read, department1write, department1delete, department1create
department2read, department2write, department2delete, department2create
department2read, department2write, department2delete, department2create
When I go to create an assignment, I enter all the information
in...Name, description, etc. I also, again via checkbox, select which
departments can view this assignment

department1view
department2view
department3view

Lets use department2 as an example. Now if I have a list off all the
assignments to be done, with their corresponding view permissions, how
would I write the query so only those show up whos user permissions
allow them to view department2 and the assignment allows
department2view.

But, if someone does not have "department2read" checked, they cannot
view these.

Does this make sense?

Brad


You can do it by using a WHERE clause in a select query but I think you're
making a huge administrative headache for yourself in persuing this method
because, as your app grows, so will the admin overhead. Access has its own
built-in user-level security (ULS) which, although flawed, is head and
shoulders above any 'roll your own' method. The downside is that it takes
time to learn and can be frustrating until the penny drops, but once it
does, you can set user permissions as appropriate and use the CurrentUser
property to determine who is logged on and fine-tune as necessary.

If you choose the ULS route be sure to read the MS FAQ on the subject (link
on my web site) and to always work on a copy of your files in case you lock
yourself out.

Regards,
Keith.
www.keithwilby.com
Apr 25 '06 #2

P: n/a
I did this once. Essentially I had several checkboxes where I could
select which department and apps within that department a user could
use.

You have to set up your queries properly to do this. All queries MUST
have criteria that select the security level. I believe we wrote the
security level on launch to a hidden field on the main menu, but with
the current version of Access you can pass it using the OpenArgs
property also. Then your queries check the user and their security
level and if they aren't allowed then no records are going to get
returned by your queries.

http://www.eyesoft.net

Apr 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.