📄 form7.frm
字号:
VERSION 5.00
Begin VB.Form Form7
BackColor = &H00FF0000&
Caption = "转帐"
ClientHeight = 4605
ClientLeft = 4785
ClientTop = 3570
ClientWidth = 6000
LinkTopic = "Form7"
ScaleHeight = 6862.791
ScaleMode = 0 'User
ScaleWidth = 7692.308
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2880
TabIndex = 6
Top = 2040
Width = 2655
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 5
Top = 1320
Width = 2895
End
Begin VB.CommandButton Command2
BackColor = &H00C0FFFF&
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3360
Style = 1 'Graphical
TabIndex = 4
Top = 3360
Width = 855
End
Begin VB.CommandButton Command1
BackColor = &H00C0FFFF&
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
Style = 1 'Graphical
TabIndex = 3
Top = 3360
Width = 855
End
Begin VB.Label Label4
BackColor = &H00C0FFFF&
Caption = "元"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5640
TabIndex = 7
Top = 2040
Width = 255
End
Begin VB.Label Label3
BackColor = &H00C0FFFF&
Caption = "请输入所转金额"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 2
Top = 2040
Width = 2175
End
Begin VB.Label Label2
BackColor = &H00C0FFFF&
Caption = "请输入所转帐户帐号"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 1
Top = 1320
Width = 2775
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 0
X2 = 7692.308
Y1 = 1251.845
Y2 = 1251.845
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 0
X2 = 7692.308
Y1 = 1073.01
Y2 = 1073.01
End
Begin VB.Label Label1
BackColor = &H00C0FFFF&
Caption = "转帐"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
TabIndex = 0
Top = 120
Width = 975
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim ee As String
ee = "select * from yinhang where 卡号='" & Trim(Text1.Text) & "'"
rsstor (ee)
Dim ff As String
If Text1.Text = str Then
MsgBox "不能给自己转帐"
Text1.Text = ""
Text2.Text = ""
Text2.SetFocus
Exit Sub
ElseIf rss.BOF Or rss.EOF Then
MsgBox "对不起,您要转入的帐户不存在!请核对后再转!"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "请确定要转入的金额"
Text2.Text = ""
Text2.SetFocus
Exit Sub
End If
ff = "select *from yinhang where 卡号='" & Trim(str) & "'"
rsstor (ff)
If Val(Text2.Text) > rss.Fields("金额") Then
MsgBox "您的余额不足,请核对后再转帐!"
Unload Me
Form2.Show
Else
rss.Fields("金额") = rss.Fields("金额") - Val(Text2.Text)
rss.Update
ee = "select 金额 from yinhang where 卡号='" & Trim(Text1.Text) & "'"
rsstor (ee)
rss.Fields("金额") = rss.Fields("金额") + Val(Text2.Text)
rss.Update
Unload Me
MsgBox "转帐成功!"
Form2.Show
End If
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -