📄 frmaccountedit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmAccountEdit
Caption = "编辑银行帐户信息"
ClientHeight = 4560
ClientLeft = 60
ClientTop = 345
ClientWidth = 5985
LinkTopic = "Form1"
ScaleHeight = 4560
ScaleWidth = 5985
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtSum
Height = 330
Left = 3960
TabIndex = 14
Top = 1653
Width = 1335
End
Begin MSAdodcLib.Adodc Ado_Bank
Height = 375
Left = 0
Top = 2880
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Ado_Bank"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataListLib.DataCombo dco_Bank
Height = 330
Left = 1320
TabIndex = 13
Top = 1197
Width = 3975
_ExtentX = 7011
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSAdodcLib.Adodc Ado_Mem
Height = 375
Left = 2760
Top = 2040
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Ado_Mem"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataListLib.DataCombo dco_Mem
Height = 330
Left = 1320
TabIndex = 12
Top = 2109
Width = 1335
_ExtentX = 2355
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin VB.TextBox txtMemo
Height = 810
Left = 1320
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 2640
Width = 3975
End
Begin VB.ComboBox cob_Flag
Height = 300
Left = 3960
TabIndex = 7
Top = 756
Width = 1335
End
Begin VB.CommandButton Cmd_Cancel
Caption = "取 消"
Height = 375
Left = 3720
TabIndex = 6
Top = 3840
Width = 1215
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 375
Left = 1080
TabIndex = 5
Top = 3840
Width = 1215
End
Begin VB.TextBox txtODate
Height = 330
Left = 1320
TabIndex = 4
Top = 1653
Width = 1335
End
Begin VB.TextBox txtANo
Height = 330
Left = 1320
TabIndex = 3
Top = 285
Width = 3975
End
Begin MSDataListLib.DataCombo dco_Type
Height = 330
Left = 1320
TabIndex = 17
Top = 741
Width = 1335
_ExtentX = 2355
_ExtentY = 582
_Version = 393216
Text = ""
End
Begin MSAdodcLib.Adodc Ado_Type
Height = 375
Left = 0
Top = 3360
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Ado_Type"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "帐户类型"
Height = 180
Left = 360
TabIndex = 16
Top = 816
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "帐户金额"
Height = 180
Left = 3000
TabIndex = 15
Top = 1728
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "说明"
Height = 180
Left = 720
TabIndex = 11
Top = 2640
Width = 360
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "开户日期"
Height = 180
Left = 360
TabIndex = 9
Top = 1728
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "开户人姓名"
Height = 180
Left = 180
TabIndex = 8
Top = 2184
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "开户银行"
Height = 180
Left = 360
TabIndex = 2
Top = 1272
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "存款类型"
Height = 180
Left = 3000
TabIndex = 1
Top = 816
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "账号"
Height = 180
Left = 720
TabIndex = 0
Top = 360
Width = 360
End
End
Attribute VB_Name = "FrmAccountEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriANo As String
Public Modify As Boolean
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Len(Trim(txtANo)) = 0 Then
MsgBox "请输入账号"
txtANo.SetFocus
Exit Sub
End If
If Len(Trim(dco_Type.Text)) = 0 Then
MsgBox "请选择帐户类型"
dco_Type.SetFocus
Exit Sub
End If
If Len(Trim(dco_Bank.Text)) = 0 Then
MsgBox "请选择开户银行"
dco_Bank.SetFocus
Exit Sub
End If
If Len(Trim(txtODate)) = 0 Then
MsgBox "请输入开户日期"
txtODate.SetFocus
Exit Sub
End If
If Len(Trim(txtSum)) = 0 Then
MsgBox "请输入帐户金额"
txtSum.SetFocus
Exit Sub
End If
If Len(Trim(dco_Mem.Text)) = 0 Then
MsgBox "请选择开户人姓名"
dco_Mem.SetFocus
Exit Sub
End If
'当添加帐户信息时,需要判断是否已经存在相同的账号信息
If MyAcc.GetInfo(Trim(txtANo)) And Modify = False Then
MsgBox "已经存在此帐户,请重新输入"
Exit Sub
End If
With MyAcc
.AccountNo = Trim(txtANo)
.BId = Val(dco_Bank.BoundText())
.MemId = Val(dco_Mem.BoundText())
.AType = Trim(dco_Type.Text)
.OpenDate = Trim(txtODate)
.ASum = Val(txtSum)
.Flag = cob_Flag.ListIndex
.Memos = Trim(txtMemo)
If Modify = False Then
.Insert
MsgBox "添加成功"
Else
.Update (OriANo)
MsgBox "修改成功"
End If
End With
Unload Me
End Sub
Private Sub Form_Load()
cob_Flag.AddItem "活期", 0
cob_Flag.AddItem "定期", 1
cob_Flag.ListIndex = 0
'载入银行信息
Ado_Bank.ConnectionString = Conn
Ado_Bank.RecordSource = "Select * From Banks Order By BankId"
Ado_Bank.Refresh
Set dco_Bank.RowSource = Ado_Bank
dco_Bank.ListField = "BankName"
dco_Bank.BoundColumn = "BankId"
'载入家庭成员信息
Ado_Mem.ConnectionString = Conn
Ado_Mem.RecordSource = "Select * From Members Order By MemId"
Ado_Mem.Refresh
Set dco_Mem.RowSource = Ado_Mem
dco_Mem.ListField = "MemName"
dco_Mem.BoundColumn = "MemId"
'载入帐户类型信息
Ado_Type.ConnectionString = Conn
Ado_Type.RecordSource = "Select Distinct AType From Account Order By AType"
Ado_Type.Refresh
Set dco_Type.RowSource = Ado_Type
dco_Type.ListField = "AType"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -