Hello,
I have a bound data entry form with 4 buttons (add record, clear form, update record and delete record).
I have the below code to disable the update and delete records button if the record is a new record. However, it is disabling the update and delete record buttons on records that are not new as well as new records.
What am I missing here?
Thank you
I have a bound data entry form with 4 buttons (add record, clear form, update record and delete record).
I have the below code to disable the update and delete records button if the record is a new record. However, it is disabling the update and delete record buttons on records that are not new as well as new records.
What am I missing here?
Code:
Private Sub Form_Current()
If Me.NewRecord = True Then
Me.AddRecord.Enabled = True
Me.ClearForm.Enabled = True
Else
Me.UpdateRecord.Enabled = False
Me.DeleteRecord.Enabled = False
End If
End Sub
Thank you