⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmainsearch.frm

📁 用vb写的饮食管理系统功能全面
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmMainSearch 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "查询参数设置"
   ClientHeight    =   3600
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6465
   Icon            =   "frmMainSearch.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3600
   ScaleWidth      =   6465
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Caption         =   "请选择以下条件"
      ForeColor       =   &H00800000&
      Height          =   2520
      Left            =   270
      TabIndex        =   11
      Top             =   270
      Width           =   5925
      Begin VB.CommandButton cmdSelectDate 
         Height          =   270
         Left            =   2415
         Picture         =   "frmMainSearch.frx":08CA
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   525
         Width           =   420
      End
      Begin VB.ComboBox cmbBranchName 
         Height          =   300
         Left            =   1410
         TabIndex        =   5
         ToolTipText     =   "选择或者输入专卖店名"
         Top             =   960
         Width           =   4140
      End
      Begin VB.ComboBox cmbStyle 
         Height          =   300
         Left            =   4365
         TabIndex        =   8
         ToolTipText     =   "选择或输入规格"
         Top             =   1935
         Width           =   1185
      End
      Begin VB.TextBox txtNO 
         Height          =   300
         Left            =   1410
         MaxLength       =   12
         TabIndex        =   7
         Top             =   1935
         Width           =   1815
      End
      Begin VB.ComboBox txtProductName 
         Height          =   300
         Left            =   1410
         TabIndex        =   6
         Top             =   1530
         Width           =   4140
      End
      Begin VB.CommandButton cmdSelectDateE 
         Enabled         =   0   'False
         Height          =   270
         Left            =   5100
         Picture         =   "frmMainSearch.frx":0A14
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   525
         Visible         =   0   'False
         Width           =   420
      End
      Begin VB.CheckBox chkEndDate 
         Caption         =   "有结束日期"
         Enabled         =   0   'False
         Height          =   240
         Left            =   3150
         TabIndex        =   2
         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        =   3
         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.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        =   17
         Top             =   555
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "会员卡号:"
         Height          =   180
         Index           =   1
         Left            =   480
         TabIndex        =   16
         Top             =   1005
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "物品名称:"
         Height          =   180
         Index           =   2
         Left            =   480
         TabIndex        =   15
         Top             =   1575
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "物品类别:"
         Height          =   180
         Index           =   3
         Left            =   3420
         TabIndex        =   14
         Top             =   1980
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "物品代码:"
         Height          =   180
         Index           =   4
         Left            =   480
         TabIndex        =   13
         Top             =   1980
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "结束日期:"
         Height          =   180
         Index           =   5
         Left            =   3150
         TabIndex        =   12
         Top             =   600
         Visible         =   0   'False
         Width           =   900
      End
   End
   Begin VB.CommandButton cmdClose 
      Cancel          =   -1  'True
      Caption         =   "关闭(&C)"
      Height          =   390
      Left            =   4980
      TabIndex        =   10
      Top             =   2970
      Width           =   1230
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定(&O)"
      Enabled         =   0   'False
      Height          =   390
      Left            =   3690
      TabIndex        =   9
      Top             =   2970
      Width           =   1230
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00808080&
      X1              =   270
      X2              =   6195
      Y1              =   2820
      Y2              =   2820
   End
End
Attribute VB_Name = "frmMainSearch"
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
  
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
  
  Select Case chineseT
  
    Case 0
    If LostControl("CunstomName", "CunstomName", cmbBranchName.Text) = False Then
       MsgBox "[ " + cmbBranchName.Text + " ] 为无效的供货单位名称,请重新输入。    ", vbInformation, "请先定义供货单位名称"
       cmbBranchName.Text = ""
       cmbBranchName.SetFocus
    End If
    Case 2
    If LostControl("BranchName", "BranchName", cmbBranchName.Text) = False Then
       MsgBox "[ " + cmbBranchName.Text + " ] 为无效的专卖店名称,请重新输入。    ", vbInformation, "请先定义专卖店名称"
       cmbBranchName.Text = ""
       cmbBranchName.SetFocus
    End If
    Case 3
    If LostControl("Main", "操作员", cmbBranchName.Text) = False Then
       MsgBox "[ " + cmbBranchName.Text + " ] 为无效的操作员,请重新输入。    ", vbInformation, "请先定义操作员"
       cmbBranchName.Text = ""
       cmbBranchName.SetFocus
    End If
    Case 4
    If LostControl("CunstomName", "CunstomName", cmbBranchName.Text) = False Then
       MsgBox "[ " + cmbBranchName.Text + " ] 为无效的供货单位名称,请重新输入。    ", vbInformation, "请先定义供货单位名称"
       cmbBranchName.Text = ""
       cmbBranchName.SetFocus
    End If
    Case 8
    If LostControl("BranchName", "BranchName", cmbBranchName.Text) = False Then
       MsgBox "[ " + cmbBranchName.Text + " ] 为无效的专卖店名称,请重新输入。    ", vbInformation, "请先定义专卖店名称"
       cmbBranchName.Text = ""
       cmbBranchName.SetFocus
    End If
  End Select

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 cmbStyle_Change()

  Call Valid_OK
  
End Sub

Private Sub cmbStyle_Click()

  Call Valid_OK
  
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 + -