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

📄 frmfind.frm

📁 用与大型超市的管理与运行;具有提高效率节省费用的优点
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"
Begin VB.Form frmFind 
   BackColor       =   &H00FFC0C0&
   BorderStyle     =   0  'None
   Caption         =   "查询"
   ClientHeight    =   6000
   ClientLeft      =   0
   ClientTop       =   -105
   ClientWidth     =   9015
   Icon            =   "frmFind.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmFind.frx":08CA
   ScaleHeight     =   6000
   ScaleWidth      =   9015
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   240
      Top             =   5040
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   3960
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   6880
      Width           =   1140
   End
   Begin MSFlexGridLib.MSFlexGrid msData 
      Bindings        =   "frmFind.frx":B058E
      Height          =   4195
      Left            =   130
      TabIndex        =   1
      Top             =   380
      Width           =   8730
      _ExtentX        =   15399
      _ExtentY        =   7408
      _Version        =   393216
      Cols            =   5
      FixedCols       =   0
      BackColor       =   16777215
      ForeColor       =   0
      BackColorFixed  =   8421376
      ForeColorFixed  =   8438015
      ForeColorSel    =   16777215
      BackColorBkg    =   16777215
      GridColorFixed  =   8421631
      ScrollTrack     =   -1  'True
      Enabled         =   -1  'True
      FocusRect       =   0
      GridLinesFixed  =   1
      SelectionMode   =   1
      AllowUserResizing=   1
      BorderStyle     =   0
      Appearance      =   0
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "关闭音乐"
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   4560
      TabIndex        =   19
      Top             =   5640
      Width           =   1575
   End
   Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 
      Height          =   495
      Left            =   3840
      TabIndex        =   18
      Top             =   5520
      Visible         =   0   'False
      Width           =   3855
      URL             =   ""
      rate            =   1
      balance         =   0
      currentPosition =   0
      defaultFrame    =   ""
      playCount       =   1
      autoStart       =   -1  'True
      currentMarker   =   0
      invokeURLs      =   -1  'True
      baseURL         =   ""
      volume          =   50
      mute            =   0   'False
      uiMode          =   "full"
      stretchToFit    =   0   'False
      windowlessVideo =   0   'False
      enabled         =   -1  'True
      enableContextMenu=   -1  'True
      fullScreen      =   0   'False
      SAMIStyle       =   ""
      SAMILang        =   ""
      SAMIFilename    =   ""
      captioningID    =   ""
      enableErrorDialogs=   0   'False
      _cx             =   6800
      _cy             =   873
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "小蘑菇超市系统"
      BeginProperty Font 
         Name            =   "新宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   375
      Left            =   0
      TabIndex        =   17
      Top             =   0
      Width           =   5175
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "查询条件:"
      Height          =   255
      Left            =   600
      TabIndex        =   16
      Top             =   4800
      Width           =   1575
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "时间"
      Height          =   255
      Left            =   2040
      TabIndex        =   15
      Top             =   5760
      Width           =   495
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "日期"
      Height          =   255
      Left            =   0
      TabIndex        =   14
      Top             =   5760
      Width           =   495
   End
   Begin VB.Label lblDay 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      ForeColor       =   &H008080FF&
      Height          =   180
      Left            =   8160
      TabIndex        =   13
      Top             =   5805
      Width           =   90
   End
   Begin VB.Label lblBB 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      ForeColor       =   &H008080FF&
      Height          =   180
      Left            =   6960
      TabIndex        =   12
      Top             =   5805
      Width           =   90
   End
   Begin VB.Label lblB 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      ForeColor       =   &H008080FF&
      Height          =   180
      Left            =   5040
      TabIndex        =   11
      Top             =   5805
      Width           =   90
   End
   Begin VB.Label lblT 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      ForeColor       =   &H008080FF&
      Height          =   180
      Left            =   2580
      TabIndex        =   10
      Top             =   5805
      Width           =   90
   End
   Begin VB.Label lblD 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      ForeColor       =   &H008080FF&
      Height          =   180
      Left            =   600
      TabIndex        =   9
      Top             =   5805
      Width           =   90
   End
   Begin MSForms.Label lblOK 
      Height          =   320
      Index           =   2
      Left            =   7880
      TabIndex        =   8
      Top             =   5180
      Width           =   855
      BackColor       =   16761024
      VariousPropertyBits=   8388627
      Size            =   "1508;564"
      SpecialEffect   =   1
      Picture         =   "frmFind.frx":B05A2
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.Label lblOK 
      Height          =   320
      Index           =   1
      Left            =   6810
      TabIndex        =   7
      Top             =   5180
      Width           =   855
      BackColor       =   16761024
      VariousPropertyBits=   8388627
      Size            =   "1508;564"
      SpecialEffect   =   1
      Picture         =   "frmFind.frx":B113E
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.Label Label2 
      Height          =   300
      Left            =   0
      TabIndex        =   6
      Top             =   0
      Width           =   855
      VariousPropertyBits=   8388627
      Size            =   "1508;529"
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.Label lblOK 
      Height          =   320
      Index           =   0
      Left            =   5760
      TabIndex        =   5
      Top             =   5180
      Width           =   855
      BackColor       =   16761024
      VariousPropertyBits=   8388627
      PicturePosition =   524294
      Size            =   "1508;547"
      SpecialEffect   =   1
      Picture         =   "frmFind.frx":B1CDA
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.TextBox txtIn 
      Height          =   300
      Left            =   2655
      TabIndex        =   4
      Top             =   5145
      Width           =   2775
      VariousPropertyBits=   746604563
      BorderStyle     =   1
      Size            =   "4895;529"
      BorderColor     =   8421504
      SpecialEffect   =   0
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.ComboBox combox2 
      Height          =   300
      Left            =   1680
      TabIndex        =   3
      Top             =   5145
      Width           =   855
      VariousPropertyBits=   746604563
      DisplayStyle    =   7
      Size            =   "1508;529"
      MatchEntry      =   1
      ShowDropButtonWhen=   1
      BorderColor     =   16744576
      SpecialEffect   =   3
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin MSForms.ComboBox combox1 
      Height          =   300
      Left            =   360
      TabIndex        =   2
      Top             =   5145
      Width           =   1215
      VariousPropertyBits=   746604563
      DisplayStyle    =   7
      Size            =   "2143;529"
      MatchEntry      =   1
      ShowDropButtonWhen=   1
      BorderColor     =   16744576
      SpecialEffect   =   3
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
   End
   Begin VB.Label lblEnd 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Height          =   300
      Left            =   8680
      TabIndex        =   0
      Top             =   0
      Width           =   300
   End
End
Attribute VB_Name = "frmFind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub combox1_Change()
 Data1.RecordSource = "select * from good"
 Data1.Refresh
End Sub

Private Sub combox2_Change()
 Data1.RecordSource = "select * from good"
 Data1.Refresh
 txtIn.SetFocus
End Sub

Private Sub Form_Activate()
 WindowsMediaPlayer1.URL = App.Path & "\钢琴曲-神秘花园.mp3"
 Timer1.Enabled = True
 lblD.Caption = Format(Date, "yyyy年mm月dd日")
 lblDay.Caption = WeekdayName(Weekday(Date))
End Sub

Private Sub Form_Load()
 Data1.DatabaseName = App.Path + "\supermarket1.mdb"
 Data1.RecordSource = "good"
 combox1.AddItem "品牌"
 combox1.AddItem "品名"
 combox1.AddItem "产地"
 combox1.AddItem "类别"
 combox1.AddItem "商品标号"
 combox1.AddItem "规格"
 combox1.AddItem "等级"
 combox2.AddItem "="
 'combox2.AddItem "<>"
 'combox2.AddItem "like"
End Sub




Private Sub Label6_Click()
If Label6.Caption = "关闭音乐" Then
Label6.Caption = "开启音乐"
WindowsMediaPlayer1.URL = ""
Else
WindowsMediaPlayer1.URL = App.Path & "\钢琴曲-神秘花园.mp3"
Label6.Caption = "关闭音乐"
End If
End Sub

Private Sub lblEnd_Click()
  Timer1.Enabled = False
  Unload Me
End Sub


Private Sub lblOK_Click(index As Integer)

 Select Case index
   Case 0
    OutFind                     '查询
   Case 1
     combox1.Value = "": combox2.Value = "": txtIn.Text = "": combox1.SetFocus
   Case 2
     lblEnd_Click
 End Select
 End Sub


Sub OutFind()
Dim st As String
On Error Resume Next
If combox1.Text = "" Or combox2.Text = "" Or txtIn.Text = "" Then
   MsgBox "请输入完整的查询条件!", vbOKOnly + vbQuestion, "提示:"
Else
  'If combox2.Text <> "like" Then
   st = combox1.Text & combox2.Text + "'" & txtIn.Text + "'"
  'Else
   'st = combox1.Text & Space(1) & "like" + "'" & "*" & txtIn.Text + "*" + "'"
  'End If
   Data1.RecordSource = "select * from good where " & st
   Data1.Refresh
   If Data1.Recordset.EOF = True And Data1.Recordset.BOF = True Then
     MsgBox "对不起!没有找到符合条件的记录!", vbOKOnly + vbApplicationModal, "提示:"
     Data1.RecordSource = "select * from good"
     Data1.Refresh
   End If
End If
End Sub



Private Sub Timer1_Timer()


 lblT.Caption = Time
End Sub

Private Sub txtIn_Change()
  If txtIn.Text = "" Then
    Data1.RecordSource = "select * from good"
    Data1.Refresh
  End If
End Sub



⌨️ 快捷键说明

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