📄 frmnewform.frm
字号:
TabIndex = 0
Top = 1320
Width = 1800
End
Begin VB.TextBox txtMoney
DataField = "档案号"
DataSource = "Data1"
ForeColor = &H00000000&
Height = 285
Left = 1080
MaxLength = 50
TabIndex = 4
Top = 2040
Width = 1800
End
Begin VB.TextBox txtAddress
BackColor = &H00FFFFFF&
DataField = "档案号"
DataSource = "Data1"
ForeColor = &H00000000&
Height = 285
Left = 4440
MaxLength = 50
TabIndex = 6
Top = 2040
Width = 2040
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
ForeColor = &H000000C0&
Height = 180
Index = 3
Left = 3000
TabIndex = 18
Top = 2040
Width = 180
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款:"
ForeColor = &H000000C0&
Height = 180
Index = 9
Left = 480
TabIndex = 17
Top = 2040
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "储种:"
ForeColor = &H000000C0&
Height = 180
Index = 8
Left = 480
TabIndex = 16
Top = 1680
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H000000C0&
Height = 180
Index = 6
Left = 3840
TabIndex = 15
Top = 1680
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H000000C0&
Height = 180
Index = 5
Left = 3840
TabIndex = 14
Top = 1320
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "帐号:"
ForeColor = &H000000C0&
Height = 180
Index = 4
Left = 480
TabIndex = 13
Top = 1320
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "地址:"
ForeColor = &H000000C0&
Height = 180
Index = 0
Left = 3840
TabIndex = 10
Top = 2040
Width = 540
End
End
End
Attribute VB_Name = "frmLost"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database, rs As Recordset, SqlStr As String
Private Sub CmdFind_Click()
On Error Resume Next
db.Close
Set db = OpenDatabase(App.Path & "\bank.mdb")
Set rs = db.OpenRecordset("存款记录", dbOpenDynaset)
SqlStr = "姓名='" & txtUserName & "'" & "AND 帐号='" & txtUserID & "'" & "AND 储种='" & Combo1 & "'" & "AND 本金=" & txtMoney
If txtUserName = "" Or txtUserID = "" Or Combo1 = "" Or txtMoney = "" Then
MsgBox "请检查 帐号、姓名、密码、存款等处是否填全!", vbInformation, " 提示:"
db.Close
Exit Sub
End If
rs.FindFirst SqlStr
If Not rs.NoMatch Then
If txtPwd = Decipher(rs!密码) Then
With frmLost
.txtUserID = rs!帐号
.txtUserName = rs!姓名
.Combo1 = rs!储种
.txtMoney = rs!本金
.txtAddress = rs!地址
.txtYear = Year(rs!存款日期)
.txtMonth = Month(rs!存款日期)
.txtday = Day(rs!存款日期)
.txtLostDay = IIf(IsDate(rs!挂失日期), rs!挂失日期, "未挂失")
.txtOperator = rs!营业员
.txtWorkNum = rs!工号
If rs!是否挂失 = True Then
MsgBox "该帐户已于 " & rs!挂失日期 & "挂失,不能提取存款!", vbInformation, "警告:"
Else
lblStatus = "找到该笔存款,尚未挂失,将于"
Select Case rs!储种
Case "定期一年": lblStatus = lblStatus & Year(rs!存款日期) + 1 & "年" & Month(rs!存款日期) & "月" & Day(rs!存款日期) & "日到期。"
Case "定期三年": lblStatus = lblStatus & Year(rs!存款日期) + 3 & "年" & Month(rs!存款日期) & "月" & Day(rs!存款日期) & "日到期。"
Case "定期五年": lblStatus = lblStatus & Year(rs!存款日期) + 5 & "年" & Month(rs!存款日期) & "月" & Day(rs!存款日期) & "日到期。"
End Select
CmdSignLost.Enabled = True
End If
End With
Else
MsgBox "用户密码错误! " & vbCrLf & vbCrLf & " 拒绝访问! ", vbCritical, "警告:"
txtPwd.SetFocus
End If
Else
MsgBox "没有找到匹配的存款记录!" & vbCrLf & vbCrLf & "请检查挂失信息填写是否正确。", vbInformation, "提示:"
End If
End Sub
Private Sub CmdSignLost_Click()
If MsgBox("您确定要挂失该存款吗?(Y/N)", vbQuestion + vbYesNo, "提示:") = vbNo Then
Exit Sub
End If
With rs
.Edit
rs!是否挂失 = True
rs!挂失日期 = Date
rs!营业员 = CurOperator
rs!工号 = OperatorID
.Update
End With
MsgBox "该帐户已经成功挂失!", vbInformation, "提示:"
End Sub
Private Sub Combo1_GotFocus()
ShowFocus Combo1
End Sub
Private Sub Combo1_LostFocus()
LeaveFocus Combo1
End Sub
Private Sub ExitB_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2, Me.Width, Me.Height
AniShowFrm Me.hwnd
CmdSignLost.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
AniUnloadFrm Me.hwnd
On Error Resume Next
db.Close
End Sub
Private Sub Money_GotFocus()
ShowFocus Money
End Sub
Private Sub Money_LostFocus()
LeaveFocus Money
End Sub
Private Sub txtAddress_GotFocus()
ShowFocus txtAddress
End Sub
Private Sub txtAddress_LostFocus()
LeaveFocus txtAddress
End Sub
Private Sub txtMoney_GotFocus()
ShowFocus txtMoney
End Sub
Private Sub txtMoney_LostFocus()
LeaveFocus txtMoney
If Not IsNumeric(txtMoney) And txtMoney <> "" Then
MsgBox "金额输入错误,请重新输入!", vbCritical, "提示:"
txtMoney.SetFocus
End If
End Sub
Private Sub txtPwd_Change()
If Len(txtPwd) >= 6 Then
txtPwd = Left(txtPwd, 6)
SendKeys "{tab}"
End If
End Sub
Private Sub txtPwd_GotFocus()
ShowFocus txtPwd
End Sub
Private Sub txtPwd_LostFocus()
LeaveFocus txtPwd
End Sub
Private Sub txtUserID_GotFocus()
ShowFocus txtUserID
End Sub
Private Sub txtUserID_LostFocus()
LeaveFocus txtUserID
End Sub
Private Sub txtUserName_Change()
If Len(txtUserName) >= 10 Then
SendKeys "{tab}"
End If
End Sub
Private Sub txtUserName_GotFocus()
ShowFocus txtUserName
End Sub
Private Sub txtUserName_LostFocus()
LeaveFocus txtUserName
End Sub
Private Sub InitForm()
txtUserID = ""
txtUserName = ""
Combo1 = ""
txtMoney = ""
txtAddress = ""
txtPwd = ""
txtYear = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -