473,605 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2568
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*****@ntlworl d.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.c om...
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*****@ntlworl d.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
3060
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 few weeks ago while trying to find the best way to form a if-elif-else block, that on a very general level, an 'also' statement might be useful. So I was wondering what others would think of it.
77
5243
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 the moment. I'd be *very* grateful if people with any interest in multi-threading would read it (even just bits of it - it's somewhat long to go through the whole thing!) to check for accuracy, effectiveness of examples, etc. Feel free to mail...
9
7119
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 when I tried the program on the Win98 system it will be running on, I get the following error: Cast from string "2076719" to type 'Long' is not valid I am not sure why I only get this error on the Win98 system or how to go about correcting...
3
1713
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 can't figure out the command to set me to the top or "beginning" and then read. (datatable.select?)
2
2610
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, the next time i build it, it will start. But next time i start debugging, i have to do the same procedure again. It was working fine earlier, but suddenly this just started happening, and I don't understand why. It's very annoying to do this...
13
3976
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 button "Unexpected Error":3251 operation is not supported for this type of object.The demo cd has two databases, one is called inventory and the other just has the tables for the design called inventory data. When you run inventory the database works...
2
14093
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". Informational tokens are "DB2 v8.1.1.104", "s060120", "U805924", and
206
8264
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 footprint which says: "Indeed, one often hears arguments against building exibility into an engineered sys- tem. For example, in the philosophy of the computer language Python it is claimed: \There should be one|and preferably only one|obvious...
1
24464
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 always seem to add things a a string? Later in my code, I try to sort based on "View_Order", but it acts like a string. The values sort as 1,2,20,21,22,3,4, NOT 1,2,3,4,20,21,22 like it should. Using Cint() while moving the values from table to...
0
7934
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8424
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8415
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8286
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6742
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5445
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1270
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.