📄 main_cxtj_skcx.frm
字号:
Begin VB.CommandButton ComFind
Caption = "查询"
Height = 330
Left = 8355
TabIndex = 12
Top = 90
Width = 1110
End
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 1335
Left = -735
TabIndex = 5
Top = 1410
Visible = 0 'False
Width = 2100
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 225
Top = 210
Width = 1725
_ExtentX = 3043
_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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 客户账款信息表"
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 MSAdodcLib.Adodc Adodc2
Height = 330
Left = 180
Top = 585
Width = 1725
_ExtentX = 3043
_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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 客户信息表"
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 MSAdodcLib.Adodc Adodc3
Height = 330
Left = 180
Top = 900
Width = 1725
_ExtentX = 3043
_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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XSGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 客户账款信息表"
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
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_cxtj_skcx.frx":0021
Height = 330
Left = 1440
TabIndex = 11
Top = 90
Width = 3015
_ExtentX = 5318
_ExtentY = 582
_Version = 393216
ListField = "客户全称"
Text = ""
End
Begin VB.Frame Frame2
Height = 495
Left = 60
TabIndex = 6
Top = 2955
Width = 10575
Begin VB.Label Labye
BackStyle = 0 'Transparent
Height = 240
Left = 7875
TabIndex = 10
Top = 195
Width = 2235
End
Begin VB.Label Labsk
BackStyle = 0 'Transparent
Height = 210
Left = 4305
TabIndex = 9
Top = 180
Width = 2340
End
Begin VB.Label Labqk
BackStyle = 0 'Transparent
Height = 225
Left = 960
TabIndex = 8
Top = 180
Width = 2130
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "欠款总计: 收款总计: 尚欠余额:"
Height = 330
Left = 60
TabIndex = 7
Top = 210
Width = 9255
End
End
Begin MSComCtl2.DTPicker DTP1
Height = 285
Left = 5040
TabIndex = 2
Top = 90
Width = 1425
_ExtentX = 2514
_ExtentY = 503
_Version = 393216
Format = 19791873
CurrentDate = 37132
End
Begin MSComCtl2.DTPicker DTP2
Height = 285
Left = 6855
TabIndex = 3
Top = 90
Width = 1410
_ExtentX = 2487
_ExtentY = 503
_Version = 393216
Format = 19791873
CurrentDate = 37132
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "日期 到"
Height = 300
Left = 4590
TabIndex = 4
Top = 165
Width = 2160
End
Begin VB.Label Label1
Caption = "请选择客户名称:"
Height = 240
Left = 90
TabIndex = 1
Top = 165
Width = 1440
End
End
Attribute VB_Name = "main_cxtj_skcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub Stat_qk_sk_ye() '定义显示汇总结果的函数
With Adodc3.Recordset
If .RecordCount > 0 Then
If .Fields(0) <> "" Then Labqk.Caption = Format(.Fields(0), "0.00") Else Labqk.Caption = "0.00"
If .Fields(1) <> "" Then Labsk.Caption = Format(.Fields(1), "0.00") Else Labsk.Caption = "0.00"
Labye.Caption = Format(Val(Labqk.Caption) - Val(Labsk.Caption), "0.00")
End If
End With
End Sub
Private Sub Form_Activate()
DTP1.Value = Date - 30: DTP2.Value = Date '初始化日期
'查询统计应收款信息
Adodc3.RecordSource = "select sum(欠款记帐)as 欠款, sum(收款合计)as 付款 from 客户账款信息表"
Adodc3.Refresh
Call Stat_qk_sk_ye '调用函数
' Me.Caption = Me.Caption & " 操作员: " & frm_main.St1.Panels(3).Text
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub DataCombo1_Change()
DataCombo1.Text = Trim(DataCombo1.BoundText) '去除空格
End Sub
Private Sub Comfind_Click() '查询统计应收款信息
Adodc1.RecordSource = "select * from 客户账款信息表 where 客户全称 like '" + DataCombo1.BoundText + "'and 日期 between '" + Str(DTP1.Value) + "' And '" + Str(DTP2.Value) + "'order by 日期,时间"
Adodc1.Refresh
Adodc3.RecordSource = "select sum(欠款记帐)as 欠款, sum(收款合计)as 付款 from 客户账款信息表 where 客户全称 like '" + DataCombo1.BoundText + "'and 日期 between '" + Str(DTP1.Value) + "' And '" + Str(DTP2.Value) + "'"
Adodc3.Refresh
Call Stat_qk_sk_ye '调用函数
End Sub
Private Sub ComExit_Click()
Call CmdEnd(Me)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -