vendredi 1 juillet 2022

How to link a checkbox and a button in a specific record in MS Access

I am about to link a checkbox and a button in the MS Access form. the button becomes disabled when the checkbox is unchecked and becomes enabled whenever it is checked. I have written lines to run this command. but the results are not satisfying. because all the same buttons become enabled when I check a checkbox. and all buttons become disabled when I uncheck a checkbox. (I mean there is no link between the button and the checkbox in a specific record.) My code is:

Private Sub reqChooesed_Click()

 If Me.reqChooesed = True Then
        Me.Command1.Enabled = True
    Else
        Me.Command1.Enabled = False
    End If
End Sub

[Example 1][1] [Example 2][2] [1]: https://ift.tt/vdSTMu7 [2]: https://ift.tt/n6baxSA




Aucun commentaire:

Enregistrer un commentaire