?? form1.frm
字號:
VERSION 5.00
Begin VB.Form changeform
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 4605
ClientLeft = 2835
ClientTop = 1755
ClientWidth = 6615
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4605
ScaleWidth = 6615
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command2
Caption = "取消"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3720
TabIndex = 7
Top = 3720
Width = 2415
End
Begin VB.CommandButton Command1
Caption = "確定"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 240
TabIndex = 6
Top = 3720
Width = 2655
End
Begin VB.TextBox renewtxt
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3000
TabIndex = 5
Top = 2280
Width = 2895
End
Begin VB.TextBox newtxt
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3000
TabIndex = 3
Top = 1320
Width = 2895
End
Begin VB.TextBox oldtxt
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3000
TabIndex = 1
Top = 360
Width = 2895
End
Begin VB.Label Label3
Caption = "確認新密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 0
TabIndex = 4
Top = 2400
Width = 2775
End
Begin VB.Label Label2
Caption = "請輸入新密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 0
TabIndex = 2
Top = 1320
Width = 2655
End
Begin VB.Label Label1
Caption = "請輸入舊密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 0
TabIndex = 0
Top = 360
Width = 2655
End
End
Attribute VB_Name = "changeform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim change As Boolean
Dim sqlstr As String
Dim idinfo As Recordset
If oldtxt <> "" And newtxt = renewtxt Then
change = True
Else
MsgBox "請確認輸入的新密碼是否一致 ", vbOKOnly, "修改出錯密碼"
oldtxt = ""
newtxt = ""
renewtxt = ""
oldtxt.SetFocus
End If
If change Then
sqlstr = "select id,pw from mmb where id='" & yhid & "'"
Set idinfo = db.OpenRecordset(sqlstr, dbOpenDynaset)
If (idinfo.Fields("pw").Value = oldtxt) Then
With idinfo
.Edit
!pw = newtxt
.Update
.Bookmark = .LastModified
End With
MsgBox "密碼修改成功", , "成功"
Unload Me
Else
MsgBox "密碼錯誤,請重試", vbOKOnly, "修改密碼出錯"
oldtxt = ""
newtxt = ""
renewtxt = ""
oldtxt.SetFocus
End If
idinfo.Close
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -