📄 out.frm
字号:
VERSION 5.00
Begin VB.Form Out
Caption = "取款"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 2760
TabIndex = 3
Top = 2040
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "取款"
Height = 495
Left = 840
TabIndex = 2
Top = 2040
Width = 1215
End
Begin VB.TextBox Text1
Height = 495
Left = 1320
TabIndex = 1
Top = 1080
Width = 1815
End
Begin VB.Label Label1
Caption = "请输入取款金额"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1320
TabIndex = 0
Top = 480
Width = 2055
End
End
Attribute VB_Name = "Out"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Not (IsNumeric(Text1.Text)) Then
MsgBox "取款金额必须为数字", vbOKOnly + vbInformation, "系统信息"
Text1.Text = ""
Text1.SetFocus
Else
Call connectDB
adoRS.Open "select * from 银行表 where 帐号='" & Login.id & " '", adoCon
adoRS.MoveFirst
Do While Not adoRS.EOF
If adoRS("余额") - Val(Text1.Text) < 0 Or (Text1.Text) = "" Then
MsgBox "对不起,您的余额不足!", vbExclamation + vbOKOnly, "交易失败"
Text1.Text = ""
Text1.SetFocus
Else
adoRS("余额") = adoRS("余额") - Val(Text1.Text)
adoRS.Update
MsgBox "您的取款完成!", vbOKOnly + vbInformation, "系统提示"
Text1.Text = ""
End If
adoRS.MoveNext
Loop
End If
End Sub
Private Sub Command2_Click()
Unload Me
Main.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -