📄 frmrepexcept.frm
字号:
VERSION 5.00
Begin VB.Form frmRepExcept
Caption = "Customer Tank Exception Report"
ClientHeight = 6810
ClientLeft = 60
ClientTop = 345
ClientWidth = 8925
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 = 6810
ScaleWidth = 8925
WindowState = 2 'Maximized
Begin VB.Frame Frame1
Caption = "Criterial Parm:"
Height = 3135
Left = 4200
TabIndex = 11
Top = 840
Width = 4215
Begin VB.Label Label5
Caption = "SS:"
Height = 255
Left = 360
TabIndex = 15
Top = 600
Width = 255
End
Begin VB.Label Label6
Caption = "Min:"
Height = 255
Left = 240
TabIndex = 14
Top = 1440
Width = 375
End
Begin VB.Label Label7
Caption = "(Actual Inventory + Total In_Transit Inventory) vs Safety Store Warning Alert If Below Safety Store"
Height = 615
Left = 720
TabIndex = 13
Top = 600
Width = 3255
End
Begin VB.Label Label8
Caption = "Actual Inventory vs Min Inventory Warning Alert If Below Safety Store"
Height = 495
Left = 720
TabIndex = 12
Top = 1440
Width = 3255
End
End
Begin VB.CommandButton Command3
Caption = "Print"
Height = 375
Left = 3120
TabIndex = 5
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "Preview"
Height = 375
Left = 1440
TabIndex = 4
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "Exit"
Height = 375
Left = 4800
TabIndex = 3
Top = 4320
Width = 1095
End
Begin VB.Frame frmlist
Height = 3135
Left = 240
TabIndex = 0
Top = 840
Width = 3735
Begin VB.TextBox txtcode
Height = 285
Left = 1320
TabIndex = 8
Top = 2520
Width = 1815
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 840
Width = 1815
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 1
Top = 1680
Width = 1815
End
Begin VB.Label Label4
Caption = "Customer Tank Code/Product Code:"
Height = 255
Left = 240
TabIndex = 10
Top = 2160
Width = 2895
End
Begin VB.Label Label2
Caption = "Printing Criteria2:"
Height = 255
Left = 240
TabIndex = 7
Top = 1320
Width = 1815
End
Begin VB.Label Label1
Caption = "Printing Criteria1:"
Height = 255
Left = 240
TabIndex = 6
Top = 480
Width = 1815
End
End
Begin VB.Label Label3
Caption = "Customer Tank Exception 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 = 9
Top = 360
Width = 4215
End
End
Attribute VB_Name = "frmRepExcept"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_LostFocus()
'If Combo1.Text = "By Entity" Then
' txtcode.Enabled = False
' Else
' txtcode.Enabled = True
' End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Dim ccode As Long
Set DataEnv = New DataEnv
Select Case Combo1.Text
Case "By Entity"
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, 1, 99999
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, 1, 99999
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, 1, 99999
RepExceptAll.Show
End If
Case "By Customer Tank"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Customer Tank Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping ccode, ccode, 1, 99999
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping ccode, ccode, 1, 99999
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping ccode, ccode, 1, 99999
RepExceptAll.Show
End If
Case "By Product"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Product Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, ccode, ccode
RepExceptMin.Show
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, ccode, ccode
RepExceptSS.Show
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, ccode, ccode
RepExceptAll.Show
End If
End Select
End Sub
Private Sub Command3_Click()
Dim ccode As Long
Set DataEnv = New DataEnv
Select Case Combo1.Text
Case "By Entity"
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, 1, 99999
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, 1, 99999
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, 1, 99999
RepExceptAll.PrintReport False, rptRangeAllPages
End If
Case "By Customer Tank"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Customer Tank Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping ccode, ccode, 1, 99999
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping ccode, ccode, 1, 99999
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping ccode, ccode, 1, 99999
RepExceptAll.PrintReport False, rptRangeAllPages
End If
Case "By Product"
If txtcode.Text <> "" Then
ccode = CLng(txtcode.Text)
Else
MsgBox "Please input the Product Code!", vbExclamation, "Information"
End If
If Combo2.Text = "By Min" Then
DataEnv.Command2_Grouping 1, 99999, ccode, ccode
RepExceptMin.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By SS" Then
DataEnv.Command1_Grouping 1, 99999, ccode, ccode
RepExceptSS.PrintReport False, rptRangeAllPages
ElseIf Combo2.Text = "By All" Then
DataEnv.cmdrepexceptall_Grouping 1, 99999, ccode, ccode
RepExceptAll.PrintReport False, rptRangeAllPages
End If
End Select
End Sub
Private Sub Form_Activate()
Combo2.SetFocus
End Sub
Private Sub Form_Load()
Combo1.AddItem ("By Entity")
Combo1.AddItem ("By Customer Tank")
Combo1.AddItem ("By Product")
Combo1.ListIndex = 0
Combo2.AddItem ("By All")
Combo2.AddItem ("By SS")
Combo2.AddItem ("By Min")
Combo2.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -