Protecting a record

S

Siobhan

is it possible to protect a record by checking a yes/no
box? ie: can i set a y/n box saying is the record
complete - and if it's checked then you cannot alter any
other details on the record?

thanks
S
 
A

Allen Browne

Use the form's Current event to set the AllowEdits (and AllowDeletions?)
property of the form:

Private Sub Form_Current
Dim bLock As Boolean

bLock = Nz(Me.[NameOfYourYesNoFieldHere].Value, False)

If Me.AllowEdits <> bLock Then
Me.AllowEdits = bLock
Me.AllowDeletions = bLock
End If
End Sub
 
Top