M
Mike Janes
I have a form with the AllowEdits property set to "No", and the
following code attached to a command button's OnClick event. The
button is by default labeled "Edit Record", and when clicked changes to
"Save Record" allowing me to edit the form. Clicking it again locks
the form, and changes the button back to "Edit Record"
If Me.CommandButton.Caption = "Edit Record" Then
Me.AllowEdits = True
Me.CommandButton.Caption = "Save Record"
Else
If Me.Dirty Then Me.Dirty = False
Me.AllowEdits = False
Me.CommandButton.Caption = "Edit Record"
End If
The problem is, the "Delete Record" button (added using the Wizard) no
longer functions! Oddly, the "Add New Record" button DOES work (also
created using the wizard).
The form's Allow Additions and Allow Deletions properties are both set
to "Yes".
any thoughts?
following code attached to a command button's OnClick event. The
button is by default labeled "Edit Record", and when clicked changes to
"Save Record" allowing me to edit the form. Clicking it again locks
the form, and changes the button back to "Edit Record"
If Me.CommandButton.Caption = "Edit Record" Then
Me.AllowEdits = True
Me.CommandButton.Caption = "Save Record"
Else
If Me.Dirty Then Me.Dirty = False
Me.AllowEdits = False
Me.CommandButton.Caption = "Edit Record"
End If
The problem is, the "Delete Record" button (added using the Wizard) no
longer functions! Oddly, the "Add New Record" button DOES work (also
created using the wizard).
The form's Allow Additions and Allow Deletions properties are both set
to "Yes".
any thoughts?