L
lhtan123
A form is disabled for editing on load by using "Me.AllowEdits = false".
Editing is enabled when a user clicks on a label called "Edit". Below is
what I intend to do:
Private Sub lblEdit_Click()
If Me.lblEdit.Caption = "Edit" Then
Me.AllowEdits = True
Me.lblEdit.Caption = "Disable Edit"
Else
If Me.lblEdit.Caption = "Disable Edit" Then
Me.AllowEdits = False
Me.lblEdit.Caption = "Edit"
End If
End If
End Sub
*************
The first block of "IF" statement works but not the second one.
When I clicked on the label with "Disable Edit", the form is still editable.
How could I disable it ?
Regards
LH
Editing is enabled when a user clicks on a label called "Edit". Below is
what I intend to do:
Private Sub lblEdit_Click()
If Me.lblEdit.Caption = "Edit" Then
Me.AllowEdits = True
Me.lblEdit.Caption = "Disable Edit"
Else
If Me.lblEdit.Caption = "Disable Edit" Then
Me.AllowEdits = False
Me.lblEdit.Caption = "Edit"
End If
End If
End Sub
*************
The first block of "IF" statement works but not the second one.
When I clicked on the label with "Disable Edit", the form is still editable.
How could I disable it ?
Regards
LH