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

📄 frmsearch.frm

📁 为一个公司
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmSearch 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "进销存查询"
   ClientHeight    =   3180
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5835
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmSearch.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3180
   ScaleWidth      =   5835
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame frmeSer 
      Caption         =   "请输入货号"
      Height          =   1500
      Left            =   2295
      TabIndex        =   7
      Top             =   720
      Width           =   3345
      Begin MSComCtl2.DTPicker dtpJhrq 
         Height          =   375
         Left            =   180
         TabIndex        =   10
         Top             =   585
         Visible         =   0   'False
         Width           =   1725
         _ExtentX        =   3043
         _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
         Format          =   23789569
         CurrentDate     =   38114
      End
      Begin VB.CommandButton cmdSer 
         Caption         =   "查询"
         Height          =   375
         Left            =   2025
         TabIndex        =   9
         Top             =   585
         Width           =   1140
      End
      Begin VB.TextBox txtHh 
         Height          =   375
         Left            =   180
         TabIndex        =   8
         Top             =   585
         Width           =   1725
      End
      Begin MSComCtl2.DTPicker dtpXsrq 
         Height          =   375
         Left            =   180
         TabIndex        =   11
         Top             =   585
         Visible         =   0   'False
         Width           =   1725
         _ExtentX        =   3043
         _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
         Format          =   23789569
         CurrentDate     =   38114
      End
   End
   Begin VB.Frame Frame1 
      Height          =   1320
      Left            =   -120
      TabIndex        =   5
      Top             =   2430
      Width           =   6135
      Begin VB.CommandButton cmdCancel 
         Caption         =   "取消"
         Height          =   375
         Left            =   4485
         TabIndex        =   6
         Top             =   225
         Width           =   1140
      End
   End
   Begin VB.OptionButton optSer 
      Caption         =   "根据销售日期查询"
      Height          =   285
      Index           =   2
      Left            =   225
      TabIndex        =   4
      Top             =   1800
      Width           =   1950
   End
   Begin VB.OptionButton optSer 
      Caption         =   "根据进货日期查询"
      Height          =   285
      Index           =   1
      Left            =   225
      TabIndex        =   3
      Top             =   1305
      Width           =   1950
   End
   Begin VB.OptionButton optSer 
      Caption         =   "根据货号查询"
      Height          =   285
      Index           =   0
      Left            =   225
      TabIndex        =   2
      Top             =   810
      Value           =   -1  'True
      Width           =   1950
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请选择查询方式"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   240
      Left            =   180
      TabIndex        =   1
      Top             =   135
      Width           =   1785
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   510
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   6000
   End
End
Attribute VB_Name = "frmSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
  Unload Me
End Sub

Private Sub cmdSer_Click()
  If optSer(0).Value = True And Trim(txtHh.Text) = "" Then
    MsgBox "请输入查询的商品货号!", vbExclamation, "进销存系统"
    Exit Sub
  End If
  With rstMain
    If .State = adStateOpen Then .Close
    If optSer(0).Value = True Then  '根据货号
      frmResult.opt(0).Visible = True
      frmResult.opt(1).Visible = True
      frmResult.opt_Click 0
    ElseIf optSer(1).Value = True Then  '进货日期
      frmResult.opt(0).Visible = False
      frmResult.opt(1).Visible = False
      frmResult.lblSer.Caption = "日期:" & CStr(dtpJhrq.Value) & " 的进货明细"
      frmResult.LoadResult_Jhrq
    ElseIf optSer(2).Visible = True Then  '销售日期
      frmResult.opt(0).Visible = False
      frmResult.opt(1).Visible = False
      frmResult.lblSer.Caption = "日期:" & CStr(dtpXsrq.Value) & " 的销售明细"
      frmResult.LoadResult_Xsrq
    End If
    frmResult.Show vbModal
  End With
End Sub

Private Sub optSer_Click(Index As Integer)
  Select Case Index
  Case 0
    frmeSer.Caption = "请输入货号"
    txtHh.Visible = True
    dtpJhrq.Visible = False
    dtpXsrq.Visible = False
    
  Case 1
    frmeSer.Caption = "请输入进货日期"
    txtHh.Visible = False
    dtpJhrq.Visible = True
    dtpXsrq.Visible = False
    
  Case 2
    frmeSer.Caption = "请输入销售日期"
    txtHh.Visible = False
    dtpJhrq.Visible = False
    dtpXsrq.Visible = True
    
  End Select
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -