📄 frmuseraddedit.frm
字号:
VERSION 5.00
Begin VB.Form frmUserAddEdit
BorderStyle = 3 'Fixed Dialog
Caption = "用户权限信息"
ClientHeight = 4830
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6030
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4830
ScaleWidth = 6030
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtPassword
Height = 270
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 9
Top = 870
Width = 2325
End
Begin VB.TextBox txtUserName
Height = 270
Left = 1800
TabIndex = 8
Top = 480
Width = 2325
End
Begin VB.Frame Frame1
Caption = "权限(&A):"
Height = 3015
Left = 480
TabIndex = 2
Top = 1440
Width = 3615
Begin VB.OptionButton Option5
Caption = "试题管理员"
Height = 180
Left = 960
TabIndex = 7
Top = 2520
Width = 1455
End
Begin VB.OptionButton Option4
Caption = "试题制作人员"
Height = 180
Left = 960
TabIndex = 6
Top = 2040
Width = 1455
End
Begin VB.OptionButton Option3
Caption = "试卷管理员"
Height = 180
Left = 960
TabIndex = 5
Top = 1560
Width = 1335
End
Begin VB.OptionButton Option2
Caption = "题库管理员"
Height = 180
Left = 960
TabIndex = 4
Top = 1080
Width = 1815
End
Begin VB.OptionButton Option1
Caption = "系统管理员"
Height = 255
Left = 960
TabIndex = 3
Top = 600
Width = 2055
End
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 4680
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 375
Left = 4680
TabIndex = 0
Top = 120
Width = 1215
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "密码(&P):"
Height = 255
Index = 1
Left = 600
TabIndex = 11
Tag = "1059"
Top = 885
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用户名(&U):"
Height = 255
Index = 0
Left = 600
TabIndex = 10
Tag = "1058"
Top = 495
Width = 1080
End
End
Attribute VB_Name = "frmUserAddEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
rs.CancelUpdate
rs.Close
Unload Me
End Sub
Private Sub Form_Load()
If userNameEditable = True Then
txtUserName.Enabled = True
' txtUserName.SetFocus
Else
txtUserName.Enabled = False
End If
End Sub
Private Sub OKButton_Click()
On Error GoTo UpdateErr
With rs
!USER_NAME = txtUserName.Text
!USER_PW = txtPassword.Text
If Me.Option1.Value = True Then
!GROUP_ID = 1
ElseIf Option2.Value = True Then
!GROUP_ID = 2
ElseIf Option3.Value = True Then
!GROUP_ID = 3
ElseIf Option4.Value = True Then
!GROUP_ID = 4
ElseIf Option5.Value = True Then
!GROUP_ID = 5
Else
MsgBox "请为用户选择合适的权限!", vbInformation + vbOKOnly
Exit Sub
End If
.Update
.Close
End With
Unload Me
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -