📄 change2.frm
字号:
VERSION 5.00
Begin VB.Form Change2
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 = 2640
TabIndex = 3
Top = 2160
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "转帐"
Height = 495
Left = 1080
TabIndex = 2
Top = 2160
Width = 1215
End
Begin VB.TextBox Text1
Height = 495
Left = 1080
TabIndex = 1
Top = 1200
Width = 2775
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 = 375
Left = 1440
TabIndex = 0
Top = 480
Width = 2055
End
End
Attribute VB_Name = "Change2"
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
Do While Not adoRS.EOF
If adoRS("余额") >= Val(Text1.Text) Then
adoRS("余额") = adoRS("余额") - Val(Text1.Text)
adoRS.Update
Else
MsgBox "对不起,您的余额不足!", vbOKOnly + vbExclamation, "转帐失败"
Text1.Text = ""
Text1.SetFocus
Exit Sub
End If
adoRS.MoveNext
Loop
Call connectDB
adoRS.Open "select * from 银行表 where 帐号='" & Change.ip & "'", adoCon
Do While Not adoRS.EOF
adoRS("余额") = adoRS("余额") + Val(Text1.Text)
adoRS.Update
MsgBox "转帐成功!", vbOKOnly + vbInformation, "转帐成功"
Text1.Text = ""
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 + -