📄 findpo.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form findpo
Caption = "Find Product Output"
ClientHeight = 1845
ClientLeft = 60
ClientTop = 345
ClientWidth = 6210
LinkTopic = "Form2"
ScaleHeight = 1845
ScaleWidth = 6210
StartUpPosition = 2 '屏幕中心
Begin MSComCtl2.DTPicker DTPicker2
Height = 300
Left = 4680
TabIndex = 8
Top = 120
Width = 1335
_ExtentX = 2355
_ExtentY = 529
_Version = 393216
Format = 23724033
CurrentDate = 37767
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 2520
TabIndex = 7
Top = 120
Width = 1455
_ExtentX = 2566
_ExtentY = 529
_Version = 393216
Format = 23724033
CurrentDate = 37767
End
Begin MSComctlLib.Toolbar Toolbar1
Height = 780
Left = 3480
TabIndex = 6
Top = 1080
Width = 2460
_ExtentX = 4339
_ExtentY = 1376
ButtonWidth = 1032
ButtonHeight = 1376
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 3
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Find"
Key = "Find"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Quit"
Key = "Quit"
ImageIndex = 2
EndProperty
EndProperty
Begin MSComctlLib.ImageList ImageList1
Left = 1860
Top = 120
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "findpo.frx":0000
Key = "Find"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "findpo.frx":110C
Key = "Quit"
EndProperty
EndProperty
End
End
Begin VB.CheckBox Check1
Height = 300
Index = 1
Left = 200
TabIndex = 5
Top = 600
Width = 250
End
Begin VB.TextBox Text1
Height = 300
Left = 2200
TabIndex = 4
Top = 600
Width = 2750
End
Begin VB.CheckBox Check1
Height = 300
Index = 0
Left = 200
TabIndex = 0
Top = 120
Width = 250
End
Begin VB.Label Label3
Caption = "InvoiceMaker:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 250
Left = 500
TabIndex = 3
Top = 600
Width = 1575
End
Begin VB.Label Label2
Caption = "To:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 4200
TabIndex = 2
Top = 180
Width = 300
End
Begin VB.Label Label1
Caption = "OutputDate: From:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 495
TabIndex = 1
Top = 180
Width = 1920
End
End
Attribute VB_Name = "findpo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "Find"
Dim db As ADODB.Connection
Set db = New ADODB.Connection
db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
"User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
If Check1(0).Value = 1 And Check1(1).Value = 0 Then
frmpoutput.Adodc_poc.RecordSource = "select * from POC where OutputDate between '" & Trim(DTPicker1.Value) & "' and '" & Trim(DTPicker2.Value) & "'"
frmpoutput.Adodc_pod.RecordSource = "select * from POD where OutputDate between '" & Trim(DTPicker1.Value) & "' and '" & Trim(DTPicker2.Value) & "'"
frmpoutput.Adodc_poc.Refresh
frmpoutput.Adodc_pod.Refresh
ElseIf Check1(0).Value = 0 And Check1(1).Value = 1 Then
frmpoutput.Adodc_poc.RecordSource = "select * from POC where InvoiceMaker = '" & Trim(Text1.Text) & "'"
frmpoutput.Adodc_poc.Refresh
frmpoutput.Adodc_pod.RecordSource = "select * from POD where OutputID='" & Trim(frmpoutput.Adodc_poc.Recordset.Fields(0)) & "'"
frmpoutput.Adodc_pod.Refresh
ElseIf Check1(0).Value = 1 And Check1(1).Value = 1 Then
frmpoutput.Adodc_poc.RecordSource = "select * from POC where OutputDate between '" & Trim(DTPicker1.Value) & "' and '" & Trim(DTPicker2.Value) & "'and InvoiceMaker = '" & Trim(Text1.Text) & "'"
frmpoutput.Adodc_poc.Refresh
frmpoutput.Adodc_pod.RecordSource = "select * from POD where OutputID='" & Trim(frmpoutput.Adodc_poc.Recordset.Fields(0)) & "'"
frmpoutput.Adodc_pod.Refresh
End If
db.Close
Case "Quit"
Unload Me
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -