Lock one Sensitive Record

M

MISOfficer

Hi

I'm using a pre-written and locked database. The FE is seperate to the BE
and I can amend the BE as necessary.

The data stored concerns a group of people and I would like to lock one
record as sensitive so that it cannot be changed. Is there anyway that I can
permanently lock a record?

Thanks

Craig
 
R

Rick B

Do you have Userl-Level Security set up? Can the users open the table
directly and modify data, or are they locked out of opening a table? Can
they open queries and modify the records? Can they build their own query on
the fly and modify records?

Lots of underlying things to lock down first.

Once you get it where the users can ONLY access data through a form based on
a query set to open with "owner's permission", then you can do what you
mention.

What you'd do at that point is add code to the "current" event of the form.
The code would say, "if the "locked" field is true, then make all the
controls on the form no longer enables, unless the current user is Xxxx."
This would assume that you have a "locked" checkbox in your table.
 
M

MISOfficer

Yes ULS is setup, the users only have access to the pre-written forms, which
I cannot modify. However they can't build their own queries only use the
forms.

Any ideas?
 
R

Rick B

Yes. If that is the case, then do what I said and modify the form's
"current" event to lock the form/fields if the record you mention is
encountered.

This is addresses pretty often in these newsgroup. You can read previous
posts on "lock specific record" if you need help with the actual code.
 
Top