📄 frmmainsearchorder.frm
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmMainSearchOrder
BorderStyle = 3 'Fixed Dialog
Caption = "查询参数设置"
ClientHeight = 3510
ClientLeft = 45
ClientTop = 330
ClientWidth = 6465
Icon = "frmMainSearchOrder.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3510
ScaleWidth = 6465
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "请选择以下条件"
ForeColor = &H00800000&
Height = 2490
Left = 270
TabIndex = 10
Top = 270
Width = 5925
Begin VB.ComboBox cmbPaymethod
Height = 300
ItemData = "frmMainSearchOrder.frx":08CA
Left = 1410
List = "frmMainSearchOrder.frx":08CC
Style = 2 'Dropdown List
TabIndex = 16
ToolTipText = "选择或输入规格"
Top = 1935
Width = 1710
End
Begin VB.CommandButton cmdSelectDate
Height = 270
Left = 2415
Picture = "frmMainSearchOrder.frx":08CE
Style = 1 'Graphical
TabIndex = 2
Top = 525
Width = 420
End
Begin VB.ComboBox cmbBranchName
Height = 300
Left = 1410
TabIndex = 3
ToolTipText = "选择或者输入专卖店名"
Top = 960
Width = 4140
End
Begin VB.ComboBox cmbStyle
Height = 300
Left = 3825
TabIndex = 5
ToolTipText = "选择或输入规格"
Top = 1530
Width = 1710
End
Begin VB.ComboBox txtProductName
Height = 300
Left = 1410
TabIndex = 4
Top = 1530
Width = 1710
End
Begin VB.CommandButton cmdSelectDateE
Enabled = 0 'False
Height = 270
Left = 5100
Picture = "frmMainSearchOrder.frx":0A18
Style = 1 'Graphical
TabIndex = 9
Top = 525
Visible = 0 'False
Width = 420
End
Begin VB.CheckBox chkEndDate
Caption = "有结束日期"
Enabled = 0 'False
Height = 240
Left = 3150
TabIndex = 8
Top = 540
Width = 1425
End
Begin MSMask.MaskEdBox txtSellDate
Height = 300
Left = 1410
TabIndex = 0
Top = 510
Width = 1440
_ExtentX = 2540
_ExtentY = 529
_Version = 393216
AllowPrompt = -1 'True
MaxLength = 10
Mask = "####-##-##"
PromptChar = "_"
End
Begin MSMask.MaskEdBox txtSellDateE
Height = 300
Left = 4095
TabIndex = 1
Top = 510
Visible = 0 'False
Width = 1440
_ExtentX = 2540
_ExtentY = 529
_Version = 393216
AllowPrompt = -1 'True
Enabled = 0 'False
MaxLength = 10
Mask = "####-##-##"
PromptChar = "_"
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "付款类型:"
Height = 180
Index = 3
Left = 465
TabIndex = 17
Top = 1995
Width = 900
End
Begin VB.Line Line3
BorderColor = &H00FFFFFF&
X1 = 510
X2 = 5535
Y1 = 1395
Y2 = 1395
End
Begin VB.Line Line2
X1 = 525
X2 = 5535
Y1 = 1380
Y2 = 1380
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "起始日期:"
Height = 180
Index = 0
Left = 480
TabIndex = 15
Top = 555
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "会员卡号:"
Height = 180
Index = 1
Left = 480
TabIndex = 14
Top = 1005
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "座位号:"
Height = 180
Index = 2
Left = 645
TabIndex = 13
Top = 1575
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "时间:"
Height = 180
Index = 4
Left = 3225
TabIndex = 12
Top = 1590
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "结束日期:"
Height = 180
Index = 5
Left = 3150
TabIndex = 11
Top = 600
Visible = 0 'False
Width = 900
End
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关闭(&C)"
Height = 390
Left = 4920
TabIndex = 7
Top = 2955
Width = 1230
End
Begin VB.CommandButton cmdOK
Caption = "确定(&O)"
Enabled = 0 'False
Height = 390
Left = 3660
TabIndex = 6
Top = 2955
Width = 1230
End
Begin VB.Line Line1
BorderColor = &H00808080&
X1 = 270
X2 = 6195
Y1 = 2790
Y2 = 2790
End
End
Attribute VB_Name = "frmMainSearchOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub SumBS(NewStr As String, NewStr1, NewStr2)
Dim DB As Database, TmpStr As String
Set DB = OpenDatabase(ConData, False, False, Constr)
TmpStr = "Delete * From SumSellForm"
DB.Execute TmpStr
TmpStr = "Insert Into SumSellForm Select 收货单位,仓库名称,产品类型,货号,产品名称,规格,单位,作废,Sum(数量) as Quantity,Sum(上衣) as Coat,Sum(裤子) as Trousers,Sum(金额) as Moneys From SellForm Where " & NewStr & " Group By 收货单位,仓库名称,产品类型,货号,产品名称,规格,单位,作废"
DB.Execute TmpStr
'更新套数
TmpStr = "Update SumSellForm Set Quantity=Coat Where Coat<=Trousers and (Coat<>0 Or Trousers<>0)"
DB.Execute TmpStr
TmpStr = "Update SumSellForm Set Quantity=Trousers Where Coat>=Trousers and (Coat<>0 Or Trousers<>0)"
DB.Execute TmpStr
TmpStr = "Update SumSellForm Set 日期=#" & NewStr1 & "#,日期2=#" & NewStr2 & "#"
DB.Execute TmpStr
DB.Close
End Sub
Private Sub chkEndDate_Click()
On Error Resume Next
If chkEndDate.Value = Checked Then
Label1(5).Visible = True
txtSellDateE.Visible = True
cmdSelectDateE.Visible = True
chkEndDate.Visible = False
Label1(5).Enabled = True
txtSellDateE.Enabled = True
cmdSelectDateE.Enabled = True
txtSellDateE.SetFocus
End If
End Sub
Private Sub cmbBranchName_Change()
Call Valid_OK
End Sub
Private Sub cmbBranchName_Click()
Call Valid_OK
txtProductName.SetFocus
End Sub
Private Sub cmbBranchName_KeyDown(KeyCode As Integer, Shift As Integer)
Call MoveToNext(KeyCode)
End Sub
Private Sub cmbBranchName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
End Sub
Private Sub cmbBranchName_LostFocus()
If cmbBranchName.Text = "" Then Exit Sub
If LostControl("Detail", "卡号", cmbBranchName.Text) = False Then
MsgBox "[ " + cmbBranchName.Text + " ] 为无效的会员卡号,请重新输入。 ", vbInformation, "请先定义会员卡"
cmbBranchName.Text = ""
cmbBranchName.SetFocus
End If
End Sub
Private Sub cmbProductType_Change()
Call Valid_OK
End Sub
Private Sub cmbProductType_Click()
Call Valid_OK
End Sub
Private Sub cmbProductType_KeyDown(KeyCode As Integer, Shift As Integer)
Call MoveToNext(KeyCode)
End Sub
Private Sub cmbProductType_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
End Sub
Private Sub cmbProductType_LostFocus()
If cmbProductType.Text = "" Then Exit Sub
If LostControl("ProductStyleDef", "产品类型", cmbProductType.Text) = False Then
MsgBox "[ " + cmbProductType.Text + " ] 为无效的产品类型名,请重新输入。 ", vbInformation, "请先定义产品类型"
cmbProductType.Text = ""
cmbProductType.SetFocus
End If
End Sub
Private Sub cmbStore_Change()
Call Valid_OK
End Sub
Private Sub cmbStore_Click()
Call Valid_OK
End Sub
Private Sub cmbStore_KeyDown(KeyCode As Integer, Shift As Integer)
Call MoveToNext(KeyCode)
End Sub
Private Sub cmbStore_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
End Sub
Private Sub cmbStore_LostFocus()
If cmbStore.Text = "" Then Exit Sub
If LostControl("StoreType", "StoreName", cmbStore.Text) = False Then
MsgBox "[ " + cmbStore.Text + " ] 为没有定义的仓库名称,请重新输入。 ", vbInformation, "请在基础设置中先定义仓库名称"
cmbStore.Text = ""
cmbStore.SetFocus
End If
End Sub
Private Sub cmbPayMethod_Change()
Call Valid_OK
If cmdOK.Enabled = True Then
cmdOK.SetFocus
End If
End Sub
Private Sub cmbPaymethod_Click()
On Error Resume Next
Call Valid_OK
If cmdOK.Enabled = True Then
cmdOK.SetFocus
End If
End Sub
Private Sub cmbStyle_Change()
Call Valid_OK
End Sub
Private Sub cmbStyle_Click()
Call Valid_OK
cmdOK.SetFocus
End Sub
Private Sub cmbStyle_KeyDown(KeyCode As Integer, Shift As Integer)
Call MoveToNext(KeyCode)
End Sub
Private Sub cmbStyle_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -