473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Changing "completed" records to "read only"

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
3 2557
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Ron Adam | last post by:
There seems to be a fair amount of discussion concerning flow control enhancements lately. with, do and dowhile, case, etc... So here's my flow control suggestion. ;-) It occurred to me (a...
77
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for...
9
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but...
3
by: Fred Nelson | last post by:
Hi: I have created a datatable and I'm able to access it by key values. I need to be able to go to the "top" of the datatable and process records sequentially until they are completed. I...
2
by: Fredrik G | last post by:
Whenever i hit F5, my project builds, but then i get an error "The operation could not be completed" Then i have to launch task manager, and end the "myproject.vshost.exe" process manually. Now,...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
1
by: Infog | last post by:
I have a dataview, and I am trying to "clone" its structure only in part, by creating a new table via code. I cut out most of the columns, so this is easier to read. My question is - Why does this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.