?? frmadduser.frm
字號:
VERSION 5.00
Begin VB.Form frmUserM
Caption = "Form1"
ClientHeight = 5640
ClientLeft = 5235
ClientTop = 3450
ClientWidth = 7500
LinkTopic = "Form1"
Picture = "frmAddUser.frx":0000
ScaleHeight = 5640
ScaleWidth = 7500
Begin VB.TextBox txtNewPass2
BackColor = &H00FFC0C0&
Height = 495
IMEMode = 3 'DISABLE
Left = 3600
PasswordChar = "*"
TabIndex = 9
Top = 3000
Width = 1575
End
Begin VB.TextBox txtNewPass1
BackColor = &H00FFC0C0&
Height = 495
IMEMode = 3 'DISABLE
Left = 3600
PasswordChar = "*"
TabIndex = 8
Top = 2160
Width = 1575
End
Begin VB.TextBox txtOldPass
BackColor = &H00FFC0C0&
Height = 495
IMEMode = 3 'DISABLE
Left = 3600
PasswordChar = "*"
TabIndex = 7
Top = 1320
Width = 1575
End
Begin VB.TextBox txtUserName
BackColor = &H00FFC0C0&
Height = 495
Left = 3600
TabIndex = 6
Top = 360
Width = 1575
End
Begin VB.CommandButton cmdExit
Caption = "退出(&E)"
Height = 615
Left = 5400
TabIndex = 1
Top = 4680
Width = 1335
End
Begin VB.CommandButton cmdOk
Caption = "確認(&O)"
Default = -1 'True
Height = 615
Left = 3240
TabIndex = 0
Top = 4680
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "確認密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 615
Left = 1800
TabIndex = 5
Top = 3120
Width = 1335
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "輸入新密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 495
Left = 1680
TabIndex = 4
Top = 2160
Width = 1695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "輸入用戶密碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 495
Left = 1680
TabIndex = 3
Top = 1440
Width = 1695
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "輸入用戶名:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF00FF&
Height = 495
Left = 1680
TabIndex = 2
Top = 480
Width = 1455
End
End
Attribute VB_Name = "frmUserM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SQLStr As String
Dim SQLStr1 As String
Dim rs As ADODB.Recordset
Dim rst As ADODB.Recordset
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
SQLStr = "select * from PasswdInfo where UserName='" & txtUserName.Text & "'and Passwd='" & txtOldPass.Text & "'"
Set rs = SQLQuery(SQLStr)
If rs.EOF = True Then
MsgBox "用戶密碼不匹配,無權更改!", vbOKOnly + vbExclamation, "警告"
txtUserName.Text = ""
txtOldPass.Text = ""
txtNewPass1.Text = ""
txtNewPass2.Text = ""
txtUserName.SetFocus
Exit Sub
Else
If txtNewPass1.Text <> txtNewPass2.Text Then
MsgBox "兩次輸入密碼不同!", vbOKOnly
txtNewPass1.Text = ""
txtNewPass2.Text = ""
txtNewPass1.SetFocus
Exit Sub
Else
'sql2 = "update user_Info set pwd = '" & newpwd1.text & " 'where id = ' " & Username.text & "'"
SQLStr1 = "select * from PasswdInfo where UserName='" & txtUserName.Text & "'"
Set rst = SQLQuery(SQLStr1)
rst.Fields(1) = txtNewPass1.Text
rst.Update
rst.Close
MsgBox "密碼修改成功!", vbOKOnly, "修改密碼"
Unload Me
End If
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -