📄 frmrepreplenish.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmRepReplenish
Caption = "Suggested/Replenish Order Summary Report"
ClientHeight = 5430
ClientLeft = 60
ClientTop = 345
ClientWidth = 6990
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5430
ScaleWidth = 6990
WindowState = 2 'Maximized
Begin VB.Frame Frame1
Height = 3015
Left = 720
TabIndex = 3
Top = 960
Width = 5655
Begin MSComCtl2.DTPicker DTPicker2
Height = 375
Left = 3600
TabIndex = 12
Top = 2280
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
Format = 24707073
CurrentDate = 37136
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1200
TabIndex = 11
Top = 2280
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
Format = 24707073
CurrentDate = 37136
End
Begin VB.TextBox txtcusc
Height = 270
Left = 1200
TabIndex = 5
Top = 1440
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1200
Style = 2 'Dropdown List
TabIndex = 4
Top = 600
Width = 1575
End
Begin VB.Label Label1
Caption = "Print Criteria:"
Height = 255
Left = 240
TabIndex = 10
Top = 360
Width = 1935
End
Begin VB.Label Label2
Caption = "Customer/Product Code:"
Height = 255
Left = 240
TabIndex = 9
Top = 1080
Width = 2055
End
Begin VB.Label Label3
Caption = "Suggested Order Date:"
Height = 255
Left = 120
TabIndex = 8
Top = 1800
Width = 1935
End
Begin VB.Label Label4
Caption = "To"
Height = 255
Left = 3000
TabIndex = 7
Top = 2400
Width = 255
End
Begin VB.Label Label5
Caption = "From"
Height = 255
Left = 720
TabIndex = 6
Top = 2400
Width = 375
End
End
Begin VB.CommandButton cmdexit
Caption = "Exit"
Height = 375
Left = 4440
TabIndex = 2
Top = 4440
Width = 1095
End
Begin VB.CommandButton cmdprint
Caption = "Print"
Height = 375
Left = 2880
TabIndex = 1
Top = 4440
Width = 1095
End
Begin VB.CommandButton cmdpreview
Caption = "Preview"
Height = 375
Left = 1320
TabIndex = 0
Top = 4440
Width = 1095
End
Begin VB.Label Label7
Caption = "Suggested/Replenish Order Summary Report"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 13
Top = 480
Width = 5415
End
End
Attribute VB_Name = "frmRepReplenish"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdpreview_Click()
Dim cuscode As Long
Dim procode As Long
Dim now1 As Date
Dim date0, date1 As Date
Set DataEnv = New DataEnv
now1 = Format(Now, "yyyy-mm-dd")
Select Case Combo1.Text
Case "By Entity"
DataEnv.CmdReplenishOrder_Grouping "By Entity", 1, 999999, 1, 999999, 19501230, getdate(now1)
RepReplenOrder.Show
Case "By Customer"
cuscode = CLng(txtcusc.Text)
DataEnv.CmdReplenishOrder_Grouping "By Customer", cuscode, cuscode, 1, 999999, 19501230, getdate(now1)
RepReplenOrder.Show
Case "By Product"
procode = CLng(txtproc.Text)
DataEnv.CmdReplenishOrder_Grouping "By Product", 1, 999999, procode, procode, 19501230, getdate(now1)
RepReplenOrder.Show
Case "By Suggested Order Date"
date0 = Format(DTPicker1.Value, "yyyy-mm-dd")
date1 = Format(DTPicker2.Value, "yyyy-mm-dd")
DataEnv.CmdReplenishOrder_Grouping "By Suggested Order Date", 1, 999999, 1, 999999, getdate(date0), getdate(date1)
RepReplenOrder.Show
End Select
End Sub
Private Sub cmdprint_Click()
Dim cuscode As Long
Dim procode As Long
Dim now1 As Date
Dim date0, date1 As Date
Set DataEnv = New DataEnv
now1 = Format(Now, "yyyy-mm-dd")
Select Case Combo1.Text
Case "By Entity"
DataEnv.CmdReplenishOrder_Grouping "By Entity", 1, 999999, 1, 999999, 19501230, getdate(now1)
RepReplenOrder.PrintReport False, rptRangeAllPages
Case "By Customer"
cuscode = CLng(txtcusc.Text)
DataEnv.CmdReplenishOrder_Grouping "By Customer", cuscode, cuscode, 1, 999999, 19501230, getdate(now1)
RepReplenOrder.PrintReport False, rptRangeAllPages
Case "By Product"
procode = CLng(txtproc.Text)
DataEnv.CmdReplenishOrder_Grouping "By Product", 1, 999999, procode, procode, 19501230, getdate(now1)
RepReplenOrder.PrintReport False, rptRangeAllPages
Case "By Suggested Order Date"
date0 = Format(DTPicker1.Value, "yyyy-mm-dd")
date1 = Format(DTPicker2.Value, "yyyy-mm-dd")
DataEnv.CmdReplenishOrder_Grouping "By Suggested Order Date", 1, 999999, 1, 999999, getdate(date0), getdate(date1)
RepReplenOrder.PrintReport False, rptRangeAllPages
End Select
End Sub
Private Sub Form_Activate()
Combo1.SetFocus
End Sub
Private Sub Form_Load()
Call initcombobox
Call initDTPicker
'Combo1.SetFocus
End Sub
Private Sub initDTPicker()
DTPicker1.Value = Now
DTPicker2.Value = Now
End Sub
Private Sub initcombobox()
Combo1.AddItem "By Entity"
Combo1.AddItem "By Customer"
Combo1.AddItem "By Product"
Combo1.AddItem "By Suggested Order Date"
Combo1.ListIndex = 0
End Sub
Private Function getdate(ByVal sdate As Date) As Long
getdate = CLng(Mid(sdate, 1, 4) & Mid(sdate, 6, 2) & Mid(sdate, 9, 2))
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -