do you mean to lock the record so that once you mark it as "locked" it can never be edited by anyone ever again?
Main Topics
Browse All TopicsHey guys,
I was jsut wondering if there any way to lock a particular record? I mean I have a " Save" button in my databse and what I want is that whenever I hit that button then nobody should be able to edit values in that record. Is there any way to implemen this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There's something you could do, though it's kind of lame.
You can modify your layout so that each field becomes a button. Clicking the button runs a script that checks the value of a flag field. If the field is true, the script will put the cursor in the field. If it is false, the script pops up an error message instead.
Another approach to this would be to have two separate layouts, one that allows editing and a duplicate that does not. Then when selecting a record to edit, a script can check that same flag field and use the editable or non-editable layout, depending on what the flag is.
These are not real security measures, but they might be good enough if you just want to prevent accidental changes to records.
You can do something like this with access privileges.
Create a field called Lock.
Go to the privilege set that the users are using.
On the Edit Privilege Set dialog there is a Records popup. Choose "Custom privileges..."
You'll get a popup dialog called "Custom Record Privileges".
Select the table you are dealing with.
There is a popup for Edit. Choose Limited.
This will give you a "Specify Calculation" window. Use Lock ` 1
Close out of account privileges.
Set up a script that will set Lock to 1.
When Lock = 1 the record will not be editable for users who are logged in with that privilege set.
Email me if any of that doesn't make sense.
--
Chad Adams
chad.adams@skeletonkey.com
Business Accounts
Answer for Membership
by: lesouefPosted on 2009-08-26 at 14:03:26ID: 25192229
what for? simply leave your mouse in a field, and the record is locked for others as long as you don't exit or validate the record.
That will work better if you have "save records changes automatically" off in your layout as you then must leave the layout to save changes and unlock the record