limiting access

L

Lori

My database is finally getting ready to go live for my company and I have a
couple of security issues.

1. I have employee evaluation forms set up in the database. Is there a way
to restrict viewing of a specific entry to only certain people (example:
Laurie, her boss and Senior management should be the only ones with access to
Laurie's evaluation and Laurie should be the only be able to edit one field
in this form) is this possible?

2. Finally, I know its possible to prevent editing once a form has been
completed by allowing imput but no editing but is it possible to recreate a
button or field that once clicked or checked will lock the form so it cannot
be changed? The evaluation form is several parts and the reviewer and the
reviewee both need to enter in their portions but it needs to be locked once
completed.
 
J

John Welch

Lori - about the second part:
I'm assuming that you don't want to lock the form as a whole, but just a
particular record displayed in the form.
You could have a yes/no field in the table called "lockme" or something,
with a corresponding checkbox control on the form. The default value of the
field would be no (or false). Then in the after_update event of the
checkbox, you could say:
if me.chkLockMe = true then
me.allowedits=false
end if

In the Current event of the form, you would say:
me.allowedits = not me.chkLockMe

This would make it so that once the checkbox was checked, you couldn't edit
that record any more via the form, but it wouldn't stop anyone from editing
the record directly from a table or query (or a different form based on the
same info.), so you would have to prevent those things from happening.
-John
 
L

Lori

Perfect. I also found a way to eliminate the need for several subforms based
on title and consolidate it into one form. Thanks for the help
 

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