lock out a record

A

alexasha

Is it possible to lock the record, after it has been finished. I have couple
times edited already complete record, and undo did not work. I am looking for
the simplest way, like a checkmark with locking code. Please help.
 
A

alexasha

I found following code
Sub EditButton_Click()
Me![Control1].Locked=True
Me![Control2].Locked=True
End Sub

It will work great, the only problem is that it locks all records, and not
just selected record
How can I modify this code?
 
S

Steve Schapel

Alexasha,

Set the AllowEdits property of the form to No. This will mean that by
default, you will be able to enter new records, but once the record has
been saved, it can't be changed.

If you will ever need to edit an existing record, then you could have a
command button with code like this on its Clicke event...
Me.AllowEdits = True
 
Top