📄 frmtiprint.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmTiprint
Caption = "提货汇总报告"
ClientHeight = 3120
ClientLeft = 2700
ClientTop = 3495
ClientWidth = 6270
Icon = "frmTiprint.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3120
ScaleWidth = 6270
Begin VB.Frame Frame1
Caption = "参数选项"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 2295
Left = 240
TabIndex = 2
Top = 120
Width = 5775
Begin VB.ComboBox cmbtype
Height = 300
ItemData = "frmTiprint.frx":0442
Left = 4080
List = "frmTiprint.frx":044F
TabIndex = 18
Text = "Combo1"
Top = 1695
Width = 1455
End
Begin VB.ComboBox cmbfang
Height = 300
ItemData = "frmTiprint.frx":0465
Left = 4080
List = "frmTiprint.frx":047B
Style = 2 'Dropdown List
TabIndex = 16
Top = 1200
Width = 1455
End
Begin VB.ComboBox cmbTown
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "frmTiprint.frx":04BB
Left = 1440
List = "frmTiprint.frx":04BD
Style = 2 'Dropdown List
TabIndex = 13
Top = 1680
Width = 1575
End
Begin VB.CommandButton cmdsolocate
Height = 285
Left = 2520
Picture = "frmTiprint.frx":04BF
Style = 1 'Graphical
TabIndex = 4
Top = 360
Width = 375
End
Begin VB.TextBox Txtclient
Height = 270
Left = 1440
MaxLength = 10
TabIndex = 3
Top = 360
Width = 1095
End
Begin MSComCtl2.DTPicker DTP1
Height = 375
Left = 1440
TabIndex = 5
Top = 720
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
CalendarForeColor= 16711680
CalendarTitleBackColor= 255
Format = 116391937
CurrentDate = 36400
End
Begin MSComCtl2.DTPicker DTP3
Height = 375
Left = 1440
TabIndex = 6
Top = 1200
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
CalendarForeColor= 16711680
CalendarTitleBackColor= 255
Format = 116391937
CurrentDate = 36400
End
Begin MSComCtl2.DTPicker DTP2
Height = 375
Left = 4080
TabIndex = 17
Top = 720
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
CalendarForeColor= 16711680
CalendarTitleBackColor= 255
Format = 116391937
CurrentDate = 36400
End
Begin VB.Label Label1
Caption = "单据类型"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 495
Left = 3120
TabIndex = 15
Top = 1665
Width = 975
End
Begin VB.Label lbl1
Caption = "客户范围:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Index = 7
Left = 240
TabIndex = 14
Top = 1718
Width = 1335
End
Begin VB.Label lbl
Caption = "到:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Index = 0
Left = 3120
TabIndex = 12
Top = 840
Width = 375
End
Begin VB.Label lbl1
Caption = "选取客户:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Index = 3
Left = 240
TabIndex = 11
Top = 360
Width = 1095
End
Begin VB.Label lbl1
Caption = "提货日期:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Index = 2
Left = 240
TabIndex = 10
Top = 720
Width = 1215
End
Begin VB.Label lblclient
ForeColor = &H000000C0&
Height = 255
Left = 3000
TabIndex = 9
Top = 360
Width = 1575
End
Begin VB.Label lbl4
Caption = "显示日期:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 240
TabIndex = 8
Top = 1200
Width = 1215
End
Begin VB.Label lblLabels
Caption = "客户方向:"
ForeColor = &H000000FF&
Height = 255
Index = 26
Left = 3120
TabIndex = 7
Top = 1200
Width = 855
End
End
Begin VB.CommandButton cmdok
Caption = "查询(&F)"
Height = 340
Left = 1800
Style = 1 'Graphical
TabIndex = 1
Top = 2640
UseMaskColor = -1 'True
Width = 1095
End
Begin VB.CommandButton cmdcancel
Caption = "关闭(&C)"
Height = 340
Left = 3360
Style = 1 'Graphical
TabIndex = 0
Top = 2640
UseMaskColor = -1 'True
Width = 1095
End
End
Attribute VB_Name = "frmTiprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim clitb As Recordset
Dim rs As Recordset
Private Sub cmbfang_Click()
If cmbfang <> "全部" Then
Set clitb = New Recordset
cmbTown.Clear
cmbTown.AddItem "全部"
clitb.Open "select distinct town from client where fangxiang='" & cmbfang.Text & "'", db, adOpenStatic, adLockOptimistic
For i = 1 To clitb.RecordCount
If Not IsNull(clitb!town) Then cmbTown.AddItem clitb!town
clitb.MoveNext
Next
cmbTown.ListIndex = 0
clitb.Close
Set clitb = Nothing
End If
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
Me.MousePointer = 11
Txtclient.Text = Trim(Txtclient.Text)
If Len(Trim(Txtclient.Text)) <> 0 Then
Set clitb = New Recordset
clitb.Open "select * from client where clino=" & "'" & Txtclient.Text & "'", db, adOpenStatic, adLockOptimistic
If clitb.RecordCount = 0 Then
MsgBox " 客户资料出错!!!,请重新输入", vbCritical, MSG2
Exit Sub
End If
End If
If Len(Trim(Txtclient.Text)) = 0 Then
sqlcc2 = "select * from ti_view where qty<>0 and (model<>'' and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "')"
Else
sqlcc2 = "select * from ti_view where qty<>0 and (model<>'' and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & " and clino=" & "'" & Txtclient.Text & "')"
End If
If cmbfang.Text <> "全部" Then
sqlcc2 = sqlcc2 & " and fangxiang= '" & cmbfang.Text & "'"
End If
If cmbTown.Text <> "全部" Then
sqlcc2 = sqlcc2 & " and town= '" & cmbTown.Text & "'"
End If
If Cmbtype.Text <> "全部" Then
sqlcc2 = sqlcc2 & " and ttype= '" & Cmbtype.Text & "'"
End If
sqlcc2 = sqlcc2 & " order by s_name,din_date,tino"
'ARtitotal.Show 1
Set rs = New Recordset
rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
If rs.RecordCount > 0 Then
rs.Close
Set rs = Nothing
ARtitotal.Show 1
Else
rs.Close
Set rs = Nothing
MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
Me.MousePointer = 0
Exit Sub
End If
Me.MousePointer = 0
End Sub
Private Sub cmdsolocate_Click()
Set pubfindtb = New Recordset
pubfindtb.Open "select clino,s_name,post,tele from client order by clino", db, adOpenStatic, adLockPessimistic
Call GenBrowse(Txtclient.Text, "客户", "tia")
Call clientdisplay("client", Txtclient.Text, lblclient)
End Sub
Private Sub Form_Activate()
Txtclient.SetFocus
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Unload Me
End Sub
Private Sub Form_Load()
DTP1.value = "1/1/2002"
DTP2.value = Date
DTP3.value = Date
'cmbfang.AddItem "全部"
'cmbfang.Text = "全部"
Set clitb = New Recordset
'Init Client FangXiang
cmbfang.Clear
cmbfang.AddItem "全部"
clitb.Open "select distinct fangxiang from fangxiang", db, adOpenStatic, adLockOptimistic
For i = 1 To clitb.RecordCount
cmbfang.AddItem clitb!fangxiang
clitb.MoveNext
Next
cmbfang.ListIndex = 0
clitb.Close
'Init Client Town
cmbTown.Clear
cmbTown.AddItem "全部"
clitb.Open "select distinct town from scope", db, adOpenStatic, adLockOptimistic
For i = 1 To clitb.RecordCount
cmbTown.AddItem clitb!town
clitb.MoveNext
Next
cmbTown.ListIndex = 0
Cmbtype.ListIndex = 0
clitb.Close
End Sub
Private Sub Form_Resize()
'On Error Resume Next
'Me.Top = 0
'Me.Left = 50
End Sub
Private Sub Txtclient_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Set clitb = New Recordset
clitb.Open "select * from client where clino=" & "'" & Txtclient.Text & "'", db, adOpenStatic, adLockOptimistic
If clitb.RecordCount = 0 Then
If Txtclient.Text <> "" Then cmdsolocate_Click
End If
Call clientdisplay("client", Txtclient.Text, lblclient)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -