【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“RMIVTA.frm”一文,供大家参考学习!
VERSION 5.00
Begin VB.Form RMIVTA
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.CheckBox CH1
Caption = "盘点数量为零不需打印"
Height = 255
Left = 120
TabIndex = 8
Top = 960
Width = 2535
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 = "RMIVTA"
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 RMIVTA
End Sub
Private Sub BTN_SEA_Click()
DR_IVTA.Sections("ReportHeader").Controls("LB_TITLE").Caption = RMIVTA.Caption
S = "SELECT * FROM IVTA "
S = S & "WHERE BGENO IS NOT NULL"
If (LB11.Text <> "") And (LB12.Text <> "") Then S = S & " AND ( IADAT >= #" + LB11.Text + "# AND IADAT <=#" + LB12.Text + "# ) "
If (LB11.Text <> "") And (LB12.Text = "") Then S = S & " AND IADAT >= #" + LB11.Text + "# "
If (LB11.Text = "") And (LB12.Text <> "") Then S = S & " AND IADAT <= #" + LB12.Text + "# "
If (CH1.Value = 1) Then S = S & " AND IACNT >= 1 "
RS.Open S, ConnString, , , adCmdText
Set DR_IVTA.DataSource = RS
DR_IVTA.Sections("DETAIL").Controls("TEXT1").DataField = "BGENO"
DR_IVTA.Sections("DETAIL").Controls("TEXT2").DataField = "RBPST"
DR_IVTA.Sections("DETAIL").Controls("TEXT3").DataField = "IACNT"
DR_IVTA.Sections("DETAIL").Controls("TEXT4").DataField = "IADAT"
DR_IVTA.Show vbModal
RS.Close
End Sub
Private Sub Form_Load()
Load DR_IVTA
CN.Open ConnString
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload DR_IVTA
CN.Close
End Sub