Have a form which AllowEdits set to No as default. Have an "Edit" button so the user can unlock the record and have attached some simple code which is causing an issue:
Private Sub Cmd_LockUnlockRecords_Click()
If Me.Form.AllowEdits = False Then
Me.Form.AllowEdits = True
ElseIf Me.Form.AllowEdits = True Then
Me.Form.AllowEdits = False
End If
End Sub
With the form set to AllowEdits = No pressing the Edit button sets AllowEdits = Yes. However on clicking the button again the AllowEdits is NOT set to No.
Would greatly appreciate a bit fo help/pointer.
Thanks,
Gareth
Private Sub Cmd_LockUnlockRecords_Click()
If Me.Form.AllowEdits = False Then
Me.Form.AllowEdits = True
ElseIf Me.Form.AllowEdits = True Then
Me.Form.AllowEdits = False
End If
End Sub
With the form set to AllowEdits = No pressing the Edit button sets AllowEdits = Yes. However on clicking the button again the AllowEdits is NOT set to No.
Would greatly appreciate a bit fo help/pointer.
Thanks,
Gareth