Tables("授权表").Visible = (User.Type <> UserTypeEnum.User ) If User.Type = UserTypeEnum.User Then For Each dr As DataRow In DataTables("授权表").Select("用户名 = '" & User.Name & "'" ) If dr("窗口不可见") = 0 Then Forms(dr("窗口名")).Show() Else Forms(dr("窗口名")).Close() End If Next End If