Dim Values() As String = {"button1", "Botton2"} '按钮名称 For i As Integer = 0 To Values.Length - 1 Dim dr As DataRow = DataTables("表名").Find("按钮名称='" & Values(i) & "' And 勾选= true") If dr IsNot Nothing Then e.form.Controls(dr("按钮名称")).Enabled = True Else e.form.Controls(dr("按钮名称")).Enabled = False End If Next