📄 form11.frm
字号:
VERSION 5.00
Begin VB.Form Form11
BackColor = &H00FFFFFF&
Caption = "密码初始化"
ClientHeight = 5880
ClientLeft = 60
ClientTop = 435
ClientWidth = 7920
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form11"
Picture = "Form11.frx":0000
ScaleHeight = 5880
ScaleWidth = 7920
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
BackColor = &H00C0E0FF&
Caption = "确定"
Height = 855
Left = 480
Style = 1 'Graphical
TabIndex = 3
Top = 3600
Width = 1935
End
Begin VB.CommandButton Command2
BackColor = &H00C0E0FF&
Caption = "退出"
Height = 855
Left = 4800
Style = 1 'Graphical
TabIndex = 2
Top = 3600
Width = 1935
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 720
TabIndex = 1
Top = 2040
Width = 3495
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00C0E0FF&
Caption = "请输入要初始化密码的帐号:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 720
TabIndex = 0
Top = 720
Width = 3135
End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim con As New ADODB.Connection
Dim rst As New ADODB.Recordset
Private Sub Command1_Click()
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wuhao"
If Text1.Text = "" Then
MsgBox "操作帐号不能为空!"
Text1.SetFocus
ElseIf Text1.Text < 10 Then
MsgBox "操作帐号输入错误!"
Text1.SetFocus
Else
rst.Open "select * from worker_xx053_19 where worker_id='" & Trim(Text1.Text) & "'", con, adOpenKeyset, adLockOptimistic
rst.Fields(4) = "000000"
rst.Update
MsgBox "密码初始化成功!"
rst.Close
End If
End Sub
Private Sub Command2_Click()
Unload Me
Form5.Show
End Sub
Private Sub Form_Load()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -