📄 存款界面.frm
字号:
VERSION 5.00
Begin VB.Form Frmsave
Caption = "存款操作窗口"
ClientHeight = 4800
ClientLeft = 60
ClientTop = 345
ClientWidth = 6105
LinkTopic = "Form7"
ScaleHeight = 4800
ScaleWidth = 6105
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox TxtName
Height = 375
Left = 2880
TabIndex = 1
Text = "Text1"
Top = 2280
Width = 1815
End
Begin VB.CommandButton ComQuit
Caption = "结束操作"
BeginProperty Font
Name = "华文行楷"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 3
Top = 3480
Width = 1095
End
Begin VB.CommandButton ComOk
Caption = "确认存款"
BeginProperty Font
Name = "华文行楷"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 2
Top = 3480
Width = 1095
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "银行模拟系统——存款界面"
BeginProperty Font
Name = "华文行楷"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 0
TabIndex = 4
Top = 120
Width = 6135
End
Begin VB.Label Label5
Caption = "请输入您的存款金额:"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 0
Top = 1560
Width = 2655
End
End
Attribute VB_Name = "Frmsave"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ComQuit_Click()
Frmsave.Hide
Frmmain.Show
End Sub
Private Sub ComOk_Click()
On Error GoTo ErrMsg
Call connectDB
adoRS.Open "select * from 银行表 where 卡号='" & Frmlogin.id & "'", adoCon
adoRS.MoveFirst
Do While Not adoRS.EOF
adoRS("余额") = adoRS("余额") + Val(TxtName.Text)
adoRS.Update
MsgBox "存款已成功,请返回界面或查询!", vbOKOnly + vbInformation, "银行系统提示"
TxtName.Text = ""
adoRS.MoveNext
Loop
ErrMsg:
If Err.Number <> 0 Then
MsgBox CStr(Err.Number) + Err.Description, vbOKOnly + vbCritical, "银行系统错误提示"
Exit Sub
End If
End Sub
Private Sub Form_Load()
On Error GoTo ErrMsg
TxtName.Text = ""
ErrMsg:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "出错提示"
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -