For Each dr1 As DataRow In DataTables("授权表").Select("',' + 分组名 + ',' like '%," & _UserGroup & ",%' And 窗口 = '" & e. Form.Name & "' and ',' + 控件 + ',' like '% '") 黄色部分有问题 e.Form. Controls(dr1("控件")).Visible = Not dr1("不可见") e.Form. Controls(dr1("控件")).Enabled = Not dr1("不可编辑") Next