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

Changing "completed" records to "read only"

P: n/a
Vic
Dear All,

I have a database of laboratory records in Access 2000. There is one
form which acts as an interface to input experimetal data. This form
incorporates information from several tables. I have a flag (yes/no
field) indicating whether a particular experiment (one record) is
completed (ie all data belonging to that record is inputted and
quality controlled). What I want is that when I change the flag to
"yes" the particular record would not be editable any more (only
viewable), but other records (where the flag is not set) could still
be accessed.

How can I achieve this? Any input, ideas are welcome...

Thank you: Viktor
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
There's no easy way to do it in the table, but it's not hard at the form
level. In the form's Current event handler, change Me.AllowEdits to True or
false depending on the status of the current record. Current fires a couple
of times before there is a valid current record, so you need some error
handling to ignore the errors trying to read data before it's ready.

Now, if you do want to handle it at the table level, you can give users
read-only permission on the table, and create a query that returns only rows
that are not completed, then use the Owner Permissions option to allow users
to edit records through that view. The problem with this approach is that you
don't one view of the data that allows viewing everything, and editing just
the non-completed records, but it does give the user just the permissions they
should have given the states of the records.

On 18 May 2004 22:29:40 -0700, la*****@ntlworld.com (Vic) wrote:
Dear All,

I have a database of laboratory records in Access 2000. There is one
form which acts as an interface to input experimetal data. This form
incorporates information from several tables. I have a flag (yes/no
field) indicating whether a particular experiment (one record) is
completed (ie all data belonging to that record is inputted and
quality controlled). What I want is that when I change the flag to
"yes" the particular record would not be editable any more (only
viewable), but other records (where the flag is not set) could still
be accessed.

How can I achieve this? Any input, ideas are welcome...

Thank you: Viktor


Nov 12 '05 #2

P: n/a
aaj
Hi

is there any reason why database engines are designed this way. I would have
thought the ability to lock records might be useful feature at table level.

thanks

Andy

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:on********************************@4ax.com...
There's no easy way to do it in the table, but it's not hard at the form
level. In the form's Current event handler, change Me.AllowEdits to True or false depending on the status of the current record. Current fires a couple of times before there is a valid current record, so you need some error
handling to ignore the errors trying to read data before it's ready.

Now, if you do want to handle it at the table level, you can give users
read-only permission on the table, and create a query that returns only rows that are not completed, then use the Owner Permissions option to allow users to edit records through that view. The problem with this approach is that you don't one view of the data that allows viewing everything, and editing just the non-completed records, but it does give the user just the permissions they should have given the states of the records.

On 18 May 2004 22:29:40 -0700, la*****@ntlworld.com (Vic) wrote:
Dear All,

I have a database of laboratory records in Access 2000. There is one
form which acts as an interface to input experimetal data. This form
incorporates information from several tables. I have a flag (yes/no
field) indicating whether a particular experiment (one record) is
completed (ie all data belonging to that record is inputted and
quality controlled). What I want is that when I change the flag to
"yes" the particular record would not be editable any more (only
viewable), but other records (where the flag is not set) could still
be accessed.

How can I achieve this? Any input, ideas are welcome...

Thank you: Viktor

Nov 12 '05 #3

P: n/a
"aaj" <a.*@c.com> wrote in message
news:40**********************@news.easynet.co.uk.. .
Hi

is there any reason why database engines are designed this way. I would have thought the ability to lock records might be useful feature at table

level.

Because they are "set oriented". It would be trivial to create two Views,
one with Completed = True that does not allow edits and one where Completed
= False that does allow edits. Then you are treating the two "sets" of
data differently.

For one set to toggle between locked and unlocked as you navigate between
rows just isn't practical at the database engine level. Especially since
it is relatively easy to provide this in the front end tool and since users
should never have direct access to the tables anyway.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.