I have a subform which is view only. apart from two clickable buttons.
One button is open and the other is edit. the edit button enabled attribute is set to 'false'
What I want to do is, if one of the fields on the form matches another field on the form then enable the button, if not keep it disabled.
I have tried entering this code on the current event of the subform, the load event, the open event and still not working
One button is open and the other is edit. the edit button enabled attribute is set to 'false'
What I want to do is, if one of the fields on the form matches another field on the form then enable the button, if not keep it disabled.
I have tried entering this code on the current event of the subform, the load event, the open event and still not working
Code:
If Me.AddedBy = Me.CurrentUser Then
Me.btnEdit.Enabled = True
Else
Me.btnEdit.enabled = false
End if