Lock only a certain subset of records

J

Jim

Hi -

Does anyone know of a way of making a certain number of
records in a given access table read-only? I have thought
of creating a key field for locking the record (yes / no),
and then making a form that only allows you to pull in
unlocked records, but I was wondering if there is some
kind of table property to allow you to lock certain
records.
 
J

John Vinson

Hi -

Does anyone know of a way of making a certain number of
records in a given access table read-only? I have thought
of creating a key field for locking the record (yes / no),
and then making a form that only allows you to pull in
unlocked records, but I was wondering if there is some
kind of table property to allow you to lock certain
records.

Access doesn't directly support row-level security. If the users can
get to table datasheet view, they can either update all the records or
none of them, depending on the security settings you've established -
one reason why users should never be allowed table datasheet access in
a secured database!

If the user can (as they should) only connect to data using a Form,
you can put code in the Form's BeforeUpdate event to block any attempt
to edit a prohibited record.
 
T

TC

(snip)
Access doesn't directly support row-level security. If the users can
get to table datasheet view, they can either update all the records or
none of them, depending on the security settings you've established -
one reason why users should never be allowed table datasheet access in
a secured database!

John, I feel that is a bit misleading. As you know, an RWOP query can easily
provide row-level security on any table. So the user could see a query
datasheet, that was functionally identical to a table datasheet, except that
it only provided a certain subset of rows. From the user's perspective, he
has a "row level security" datasheet. It is a query datasheet - not a table
datasheet - but who cares? With an updatable query, there's not much
functional difference. And the user could not access the table directly at
all.

Yes? No?

Cheers,
TC
(off for the day)
 
J

John Vinson

John, I feel that is a bit misleading. As you know, an RWOP query can easily
provide row-level security on any table.

You're absolutely correct. I was fixated on *table* security per se;
RWOP queries would indeed fill the bill (and could be used as
rowsource for a form as well).
 

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