Protect record

H

Hong

I want protect the record in the Form, because when the people open the form,
then they just overwrite the old record.

How can I protect the record, like they can view the old record, but can't
change it, or if they want to update they should use a command button then
they can make change.

Thanks for your help
 
B

Bill Edwards

Private Sub Form_Current()
If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
End Sub

in the command button's click event put:
me.allowedits = true
 
H

Hong

Sorry, I am new in Access, I have no idea where to put those code.

Please direct, thanks a lot
 
Top