lock out a record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Record-Locking remains open after closing 0
Record lock time-out 7
Record Locking 2
Locked Records 2
Record Locking 3
Locking a record via a form 2
pessimistic locking 3
Muilty-user locks Records 5

Back
Top