📄 存款.frm
字号:
VERSION 5.00
Begin VB.Form Form9
BackColor = &H00FFC0C0&
Caption = "存款信息"
ClientHeight = 5160
ClientLeft = 60
ClientTop = 450
ClientWidth = 10230
LinkTopic = "Form9"
Picture = "存款.frx":0000
ScaleHeight = 5160
ScaleWidth = 10230
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "存款信息"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 2655
Left = 2160
TabIndex = 0
Top = 1440
Width = 5295
Begin VB.TextBox Text1
Height = 495
Left = 2640
TabIndex = 8
Top = 600
Width = 2175
End
Begin VB.TextBox Text2
Height = 495
Left = 2640
TabIndex = 7
Top = 1200
Width = 2175
End
Begin VB.CommandButton Command3
Caption = "存款"
Height = 495
Left = 2640
Picture = "存款.frx":4F4CC
Style = 1 'Graphical
TabIndex = 6
Top = 1800
Width = 2175
End
Begin VB.OptionButton Option2
BackColor = &H00FFC0C0&
Caption = "帐"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2760
TabIndex = 5
Top = 120
Width = 2055
End
Begin VB.OptionButton Option1
BackColor = &H00FFC0C0&
Caption = "卡"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 4
Top = 120
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 480
Picture = "存款.frx":57DA2
Style = 1 'Graphical
TabIndex = 3
Top = 1800
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "卡号|折号"
Height = 495
Index = 1
Left = 480
Picture = "存款.frx":60678
Style = 1 'Graphical
TabIndex = 2
Top = 600
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "存款金额"
Height = 495
Index = 3
Left = 480
Picture = "存款.frx":68F4E
Style = 1 'Graphical
TabIndex = 1
Top = 1200
Width = 1575
End
End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yg9 As String
Public yh9 As String
Private Sub Command2_Click()
Unload Me
Form3.Show
End Sub
Private Sub Command3_Click()
Dim nowTime As String
Dim lost1 As Integer
Dim class1 As Integer
nowTime = Now
If Option1.Value = False And Option2.Value = False Then
MsgBox "请选择卡还是帐户取款!"
Text1.SetFocus
ElseIf Text1.Text = "" Or Text2.Text = "" Then
MsgBox "输入不能为空!"
Text1.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text1.Text) Or Len(Text1.Text) <> 18 Then
MsgBox "输入不正确"
Text1.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "取款金额输入不对"
Text2.SetFocus
ElseIf Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入卡号不存在!请从新输入"
rs.Close
Unload Me
Form8.Show
Else
lost1 = rs!lost
cash1 = rs!balance
If lost1 = 1 Then
MsgBox "此卡已被挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(3) = cash1 + Trim(Text2.Text)
rs.Update
rs.Close
rs.Open "select * from access_xx053_06 ", conn, adOpenDynamic, adLockOptimistic
conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text2.Text) & "','" & nowTime & "','" & yh9 & "','" & yg9 & "','" & Trim(Text1.Text) & "',null)"
MsgBox "存款成功!"
rs.Close
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入的帐号不存在!请从新输入"
Unload Me
Form8.Show
Else
lost1 = rs!lost
cash1 = rs!balance
If lost = 1 Then
MsgBox "此账号已被挂失!"
rs.Close
Unload Me
Form3.Show
Else
rs.Fields(7) = cash1 + Trim(Text2.Text)
rs.Update
conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text2.Text) & "','" & nowTime & "','" & yh9 & "','" & yg9 & "',null,'" & Trim(Text1.Text) & "')"
MsgBox "存款成功!"
rs.Close
Unload Me
Form3.Show
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -