📄 rmivtt.frm
字号:
VERSION 5.00
Begin VB.Form RMIVTT
Caption = "盘点盈亏统计报表"
ClientHeight = 2520
ClientLeft = 60
ClientTop = 345
ClientWidth = 5775
LinkTopic = "Form1"
ScaleHeight = 2520
ScaleWidth = 5775
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "查询"
Height = 2295
Left = 100
TabIndex = 0
Top = 120
Width = 5600
Begin VB.OptionButton OP4
Caption = "全部"
Height = 255
Left = 1080
TabIndex = 11
Top = 1680
Value = -1 'True
Width = 1695
End
Begin VB.OptionButton OP3
Caption = "正常"
Height = 255
Left = 1080
TabIndex = 10
Top = 1440
Width = 1695
End
Begin VB.OptionButton OP2
Caption = "盘亏"
Height = 255
Left = 1080
TabIndex = 9
Top = 1200
Width = 1695
End
Begin VB.OptionButton OP1
Caption = "盘盈"
Height = 255
Left = 1080
TabIndex = 8
Top = 960
Width = 1695
End
Begin VB.TextBox LB12
Height = 270
Left = 2280
TabIndex = 6
Top = 360
Width = 975
End
Begin VB.TextBox LB11
Height = 270
Left = 960
TabIndex = 4
Top = 360
Width = 975
End
Begin VB.CommandButton BTN_QUT
Caption = "关闭"
Height = 500
Left = 3840
TabIndex = 3
Top = 1440
Width = 1500
End
Begin VB.CommandButton BTN_CLR
Caption = "清除"
Height = 500
Left = 3840
TabIndex = 2
Top = 840
Width = 1500
End
Begin VB.CommandButton BTN_SEA
Caption = "查询"
Height = 500
Left = 3840
TabIndex = 1
Top = 240
Width = 1500
End
Begin VB.Label Label2
Caption = "°"
Height = 195
Left = 2040
TabIndex = 7
Top = 405
Width = 315
End
Begin VB.Label Label1
Caption = "查询日期"
Height = 195
Left = 120
TabIndex = 5
Top = 405
Width = 795
End
End
End
Attribute VB_Name = "RMIVTT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CN As New ADODB.Connection, RS As New ADODB.Recordset
Public SQL As String
Const DBPATH = "./POS.MDB"
Const ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPATH
Private Sub BTN_CLR_Click()
LB11.Text = ""
LB12.Text = ""
End Sub
Private Sub BTN_QUT_Click()
Unload RMIVTT
End Sub
Private Sub BTN_SEA_Click()
DR_IVTT.Sections("ReportHeader").Controls("LB_TITLE").Caption = RMIVTT.Caption
S = "SELECT * FROM IVTT "
S = S & "WHERE ITENO IS NOT NULL"
If (LB11.Text <> "") And (LB12.Text <> "") Then S = S & " AND ( ITDAT >= #" + LB11.Text + "# AND ITDAT <=#" + LB12.Text + "# ) "
If (LB11.Text <> "") And (LB12.Text = "") Then S = S & " AND ITDAT >= #" + LB11.Text + "# "
If (LB11.Text = "") And (LB12.Text <> "") Then S = S & " AND ITDAT <= #" + LB12.Text + "# "
If (OP1.VALUE = True) Then S = S & " AND ITCN1 > ITCN2 "
If (OP2.VALUE = True) Then S = S & " AND ITCN1 < ITCN2 "
If (OP3.VALUE = True) Then S = S & " AND ITCN1 = ITCN2 "
RS.Open S, ConnString, , , adCmdText
Set DR_IVTT.DataSource = RS
DR_IVTT.Sections("DETAIL").Controls("TEXT1").DataField = "RBPST"
DR_IVTT.Sections("DETAIL").Controls("TEXT2").DataField = "BGEN1"
DR_IVTT.Sections("DETAIL").Controls("TEXT3").DataField = "ITCN1"
DR_IVTT.Sections("DETAIL").Controls("TEXT4").DataField = "ITCN2"
DR_IVTT.Sections("DETAIL").Controls("TEXT5").DataField = "ITCNT"
DR_IVTT.Show vbModal
RS.Close
End Sub
Private Sub Form_Load()
Load DR_IVTT
CN.Open ConnString
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload DR_IVTT
CN.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -