?? frmmodifyid.frm
字號:
VERSION 5.00
Begin VB.Form frmmodifyid
Caption = "修改密碼"
ClientHeight = 4005
ClientLeft = 60
ClientTop = 345
ClientWidth = 6105
LinkTopic = "Form1"
ScaleHeight = 4005
ScaleWidth = 6105
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 615
Left = 3120
TabIndex = 5
Top = 2640
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "確認"
Height = 615
Left = 840
TabIndex = 4
Top = 2640
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
Left = 3000
TabIndex = 3
Top = 1440
Width = 2295
End
Begin VB.TextBox Text1
Height = 615
Left = 3000
TabIndex = 2
Top = 480
Width = 2295
End
Begin VB.Label Label2
Caption = "請確認新密碼"
Height = 495
Left = 600
TabIndex = 1
Top = 1440
Width = 1815
End
Begin VB.Label Label1
Caption = "請輸入新密碼"
Height = 495
Left = 600
TabIndex = 0
Top = 480
Width = 1695
End
End
Attribute VB_Name = "frmmodifyid"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Me.Hide
frmMain.Show
End Sub
Private Sub Form_Load()
Set conn = New ADODB.Connection
conn.Open "DSN=電腦經(jīng)營系統(tǒng)", ";pwd=14813808"
Set ado = New ADODB.Recordset
ado.Open "select * from 用戶注冊", conn, adOpenStatic, adLockOptimistic
End Sub
Private Sub Command1_Click()
Set conn = New ADODB.Connection
conn.Open "DSN=電腦經(jīng)營系統(tǒng)", ";pwd=14813808"
Set ado = New ADODB.Recordset
ado.Open "select * from 用戶注冊", conn, adOpenStatic, adLockOptimistic
Dim txtsql As String
If Text1.Text <> Text2.Text Then
MsgBox "兩次輸入密碼不一樣,請確認", vbOKOnly + vbExclamation, "警告!"
Text1.SetFocus
Text1.Text = ""
Else
txtsql = "select * from 用戶注冊 where 密碼='" & Trim(Text1.Text) & "'"
ado.Fields("密碼") = Text1.Text
ado.Update
ado.Close
MsgBox "密碼修改成功!", vbOKOnly + vbExclamation, "修改密碼"
Me.Hide
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -