?? frmadduser.frm
字號:
VERSION 5.00
Begin VB.Form frmadduser
BorderStyle = 3 'Fixed Dialog
ClientHeight = 1680
ClientLeft = 45
ClientTop = 330
ClientWidth = 4110
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1680
ScaleWidth = 4110
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 465
Left = 2970
TabIndex = 5
Top = 750
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "確定"
Default = -1 'True
Height = 465
Left = 3000
TabIndex = 4
Top = 180
Width = 1095
End
Begin VB.TextBox Text2
BackColor = &H00C0FFFF&
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 1230
PasswordChar = "*"
TabIndex = 3
Top = 900
Width = 1515
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 1230
TabIndex = 2
Top = 270
Width = 1515
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "用戶密碼"
BeginProperty Font
Name = "楷體_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 90
TabIndex = 1
Top = 960
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用戶名稱"
BeginProperty Font
Name = "楷體_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 60
TabIndex = 0
Top = 330
Width = 900
End
End
Attribute VB_Name = "frmadduser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'安全性檢查
If Text1.Text = "" Then
MsgBox "請輸入操作員姓名!", vbOKOnly, "無用戶名"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "請輸入用戶密碼!", vbOKOnly, "無密碼"
Exit Sub
End If
On Error GoTo errhandler
If isxg = False Then
rspsw.AddNew
If Text1.Text <> "" Then rspsw.Fields("user_name") = Text1.Text
If Text2.Text <> "" Then rspsw.Fields("password") = Text2.Text
rspsw.Update
MsgBox "成功添加操作員!", vbOKOnly, "成功"
ElseIf isxg = True Then
Set rspsw = New ADODB.Recordset
rspsw.open "select user_name from load where user_name='" & Text1.Text & "'", cnYF, adOpenStatic, adLockPessimistic
If Text2.Text <> "" Then rspsw.Fields("user_name") = Text2.Text
rspsw.Update
t = MsgBox("成功更改操作員姓名!", vbOKOnly, "成功")
End If
Unload Me
Exit Sub
errhandler:
MsgBox Err.Description, vbOKOnly, "出錯"
End Sub
Private Sub Command2_Click()
If cn.State = 1 Then
cn.close
End If
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -