📄 frmsqye.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmsqye
BorderStyle = 3 'Fixed Dialog
Caption = "承兑申请人余额"
ClientHeight = 2985
ClientLeft = 45
ClientTop = 330
ClientWidth = 4485
Icon = "frmsqye.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2985
ScaleWidth = 4485
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 240
Top = 2640
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * form 承兑申请人年初余额"
Caption = "Adodc1"
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.Frame Frame2
Height = 532
Left = 747
TabIndex = 7
Top = 2280
Width = 2990
Begin VB.CommandButton Command1
Caption = "应用"
Enabled = 0 'False
Height = 375
Left = 30
TabIndex = 10
Top = 120
Width = 975
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 1010
TabIndex = 9
Top = 120
Width = 975
End
Begin VB.CommandButton Command6
Caption = "确定"
Height = 375
Left = 1980
Picture = "frmsqye.frx":000C
TabIndex = 8
Top = 120
Width = 975
End
End
Begin VB.Frame Frame1
Height = 2055
Left = 360
TabIndex = 0
Top = 120
Width = 3735
Begin VB.TextBox Text1
Height = 300
Left = 1680
TabIndex = 3
Top = 1400
Width = 1575
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmsqye.frx":044E
Left = 1680
List = "frmsqye.frx":04E8
TabIndex = 2
Text = "Combo2"
Top = 920
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmsqye.frx":0618
Left = 1680
List = "frmsqye.frx":061A
Style = 2 'Dropdown List
TabIndex = 1
Top = 440
Width = 1575
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "期初余额 "
Height = 255
Left = 440
TabIndex = 6
Top = 1440
Width = 975
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "设置年度"
Height = 255
Left = 360
TabIndex = 5
Top = 965
Width = 975
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "承兑申请人"
Height = 255
Left = 420
TabIndex = 4
Top = 490
Width = 975
End
End
End
Attribute VB_Name = "frmsqye"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Command1.Enabled = True
Adodc1.RecordSource = "select * from 承兑申请人年初余额 where 年度=" & Val(Combo2.Text) & " and 承兑申请人=" & "'" & Combo1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 1 Then
Text1.Text = Adodc1.Recordset.Fields(3).Value
ElseIf Adodc1.Recordset.RecordCount = 0 Then
Text1.Text = 0
End If
End Sub
Private Sub Combo2_Change()
Command1.Enabled = True
Adodc1.RecordSource = "select * from 承兑申请人年初余额 where 年度=" & Val(Combo2.Text) & " and 承兑申请人=" & "'" & Combo1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 1 Then
Text1.Text = Adodc1.Recordset.Fields(3).Value
ElseIf Adodc1.Recordset.RecordCount = 0 Then
Text1.Text = 0
End If
End Sub
Private Sub Combo2_Click()
Command1.Enabled = True
Adodc1.RecordSource = "select * from 承兑申请人年初余额 where 年度=" & Val(Combo2.Text) & " and 承兑申请人=" & "'" & Combo1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 1 Then
Text1.Text = Adodc1.Recordset.Fields(3).Value
ElseIf Adodc1.Recordset.RecordCount = 0 Then
Text1.Text = 0
End If
End Sub
Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox "承兑申请人不得为空值!", vbOKOnly Or vbInformation, "系统信息"
Exit Sub
End If
Command1.Enabled = False
Adodc1.RecordSource = "select * from 承兑申请人年初余额 where 年度=" & Val(Combo2.Text) & " and 承兑申请人=" & "'" & Combo1.Text & "'"
Adodc1.Refresh
With Adodc1.Recordset
If .RecordCount = 1 Then
.Fields(3).Value = Val(Text1.Text)
.Update
ElseIf .RecordCount = 0 Then
.AddNew
.Fields(1).Value = Combo1.Text
.Fields(2).Value = Val(Combo2.Text)
.Fields(3).Value = Val(Text1.Text)
.Update
End If
End With
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command6_Click()
If Combo1.Text = "" Then
MsgBox "承兑申请人不得为空值!", vbOKOnly Or vbInformation, "系统信息"
Exit Sub
End If
Adodc1.RecordSource = "select * from 承兑申请人年初余额 where 年度=" & Val(Combo2.Text) & " and 承兑申请人=" & "'" & Combo1.Text & "'"
Adodc1.Refresh
With Adodc1.Recordset
If .RecordCount = 1 Then
.Fields(3).Value = Val(Text1.Text)
.Update
ElseIf .RecordCount = 0 Then
.AddNew
.Fields(1).Value = Combo1.Text
.Fields(2).Value = Val(Combo2.Text)
.Fields(3).Value = Val(Text1.Text)
.Update
End If
End With
Unload Me
End Sub
Private Sub Form_Load()
Screen.MousePointer = 11
With ycdck.Adodc1
Dim shu As Integer
.RecordSource = "select 承兑申请人 from 承兑申请人 group by 承兑申请人"
.Refresh
shu = .Recordset.RecordCount
frmDataEnv.Combo1.Clear
For i = 1 To shu
frmsqye.Combo1.AddItem .Recordset.Fields(0).Value
.Recordset.MoveNext
Next i
End With
Combo2.Text = Year(Now)
Screen.MousePointer = 0
End Sub
Private Sub Form_Resize()
Command1.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -