?? 密碼設(shè)置.frm
字號(hào):
VERSION 5.00
Begin VB.Form main_xt_mmsz
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "系統(tǒng)設(shè)置——【密碼設(shè)置】"
ClientHeight = 2775
ClientLeft = 2715
ClientTop = 3690
ClientWidth = 6525
Icon = "密碼設(shè)置.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2775
ScaleWidth = 6525
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 1305
Left = -195
TabIndex = 5
Top = 1005
Visible = 0 'False
Width = 1590
Begin VB.TextBox ma
DataField = "密碼"
DataSource = "Data1"
Height = 270
Left = 135
TabIndex = 8
Top = 645
Width = 990
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\行業(yè)管理軟件之一\醫(yī)藥門店版\yyjxc.mdb"
DefaultCursorType= 0 '缺省游標(biāo)
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 60
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "ma"
Top = 285
Visible = 0 'False
Width = 1140
End
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Height = 405
Left = 3360
Picture = "密碼設(shè)置.frx":000C
Style = 1 'Graphical
TabIndex = 4
Top = 2235
Width = 1575
End
Begin VB.TextBox Text3
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2085
TabIndex = 3
Top = 1635
Width = 2880
End
Begin VB.TextBox Text2
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2085
TabIndex = 2
Top = 1065
Width = 2880
End
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2085
TabIndex = 1
Text = " "
Top = 510
Width = 2880
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Height = 405
Left = 1605
Picture = "密碼設(shè)置.frx":19C6
Style = 1 'Graphical
TabIndex = 0
Top = 2235
Width = 1575
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "操作員 原密碼 新密碼"
Height = 1365
Left = 1500
TabIndex = 7
Top = 630
Width = 690
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "請(qǐng)輸入操作員代號(hào)、原密碼和新密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 120
TabIndex = 6
Top = 90
Width = 5100
End
End
Attribute VB_Name = "main_xt_mmsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\yyjxc.mdb" '自動(dòng)識(shí)別數(shù)據(jù)庫(kù)路徑
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text2.SetFocus
End Sub
Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text3.SetFocus
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Command1.SetFocus
End Sub
Private Sub Command1_Click() '確認(rèn)修改操作員信息
Data1.RecordSource = "select * from ma where 操作員='" + Text1.Text + "'" '查詢操作員信息
Data1.Refresh
If Text1.Text <> "" And Text2.Text <> "" And Text2.Text = ma.Text Then
If Text3.Text <> "" Then
Data1.Recordset.Edit
Data1.Recordset.Fields("密碼") = Text3.Text
Data1.Recordset.Update
MsgBox ("密碼修改成功!")
Else
MsgBox ("請(qǐng)輸入新密碼!!")
End If
Else
If Text1.Text = "" Then
MsgBox ("請(qǐng)輸入操作員代號(hào)!")
Text1.SetFocus
Else
If Text1.Text <> Data1.Recordset.Fields("操作員") Then Text1.SetFocus
If Text2.Text = "" Then
MsgBox ("請(qǐng)輸入操作員原密碼!")
Text2.SetFocus
Else
If Text2.Text <> Data1.Recordset.Fields("密碼") Then
MsgBox ("原密碼錯(cuò)誤,請(qǐng)重新輸入原密碼!")
Text2.SetFocus
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
frm_main.Enabled = True
Unload Me
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -