Public Sub sub_MainRight(ByVal strForm As Form, ByVal strParentForm As String) '用来进行权限判断 '++=========================== Dim vnt As Variant Dim sQuery As String Dim i As Integer Dim ii As Integer sQuery = "SELECT * FROM tblprorightlaborclass where nameid='" & s_gl_UserNameID & "'" Set rstCMMSRight = cnnCMMS.Execute(sQuery) If rstCMMSRight.RecordCount <> 0 Then For i = 1 To rstCMMSRight.RecordCount Select Case rstCMMSRight.Fields("controlname").Value '*****************管理策划
Case "帐 号" Select Case rstCMMSRight.Fields("status").Value Case 1 MDIForm1.m_account.Visible = False MDIForm1.m_account.Enabled = False Case 2 MDIForm1.m_account.Visible = True MDIForm1.m_account.Enabled = False Case 3 MDIForm1.m_account.Visible = True MDIForm1.m_account.Enabled = True End Select ......
End Select rstCMMSRight.MoveNext Next End IfEnd Sub
'用来进行权限判断
'++===========================
Dim vnt As Variant Dim sQuery As String
Dim i As Integer
Dim ii As Integer
sQuery = "SELECT * FROM tblprorightlaborclass where nameid='" & s_gl_UserNameID & "'"
Set rstCMMSRight = cnnCMMS.Execute(sQuery)
If rstCMMSRight.RecordCount <> 0 Then
For i = 1 To rstCMMSRight.RecordCount Select Case rstCMMSRight.Fields("controlname").Value
'*****************管理策划
Select Case rstCMMSRight.Fields("status").Value
Case 1
MDIForm1.m_account.Visible = False
MDIForm1.m_account.Enabled = False
Case 2
MDIForm1.m_account.Visible = True
MDIForm1.m_account.Enabled = False
Case 3
MDIForm1.m_account.Visible = True
MDIForm1.m_account.Enabled = True
End Select
......
End Select
rstCMMSRight.MoveNext
Next
End IfEnd Sub