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

📄 frmemployeequery1.frm

📁 传销工资管理 请验证一下哈
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      Height          =   330
      Left            =   2400
      Top             =   975
      Visible         =   0   'False
      Width           =   2445
      _ExtentX        =   4313
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   16711680
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\SYSTEM\DATABASE\SYSTEM.MDB"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\SYSTEM\DATABASE\SYSTEM.MDB"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 员工详细资料 order by 工号"
      Caption         =   "员工详细资料"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton cmdLast 
      Caption         =   "末条"
      Height          =   375
      Left            =   2250
      TabIndex        =   56
      Top             =   6300
      Visible         =   0   'False
      Width           =   765
   End
   Begin VB.CommandButton cmdPrevious 
      Caption         =   "上条"
      Height          =   375
      Left            =   1500
      TabIndex        =   57
      Top             =   6300
      Visible         =   0   'False
      Width           =   765
   End
   Begin VB.CommandButton cmdNext 
      Caption         =   "次条"
      Height          =   375
      Left            =   750
      TabIndex        =   58
      Top             =   6300
      Visible         =   0   'False
      Width           =   765
   End
   Begin VB.CommandButton cmdFirst 
      Caption         =   "首条"
      Height          =   375
      Left            =   0
      TabIndex        =   59
      Top             =   6300
      Visible         =   0   'False
      Width           =   765
   End
   Begin VB.CommandButton cmdClose 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      Caption         =   "关闭窗口"
      Height          =   375
      Left            =   6675
      Style           =   1  'Graphical
      TabIndex        =   60
      Top             =   6300
      UseMaskColor    =   -1  'True
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.CommandButton cmdQuery 
      Caption         =   "查 询"
      Height          =   360
      Left            =   4650
      TabIndex        =   61
      Top             =   6375
      Visible         =   0   'False
      Width           =   915
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   4500
      Top             =   675
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   6
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":D445
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":D75F
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":DA79
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":DD93
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":E0AD
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmEmployeeQuery1.frx":E3C7
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Label Label9 
      Caption         =   "工号"
      DataField       =   "工号"
      DataSource      =   "Adodc1"
      ForeColor       =   &H00FF0000&
      Height          =   165
      Left            =   900
      TabIndex        =   45
      Top             =   975
      Width           =   1140
   End
   Begin VB.Label Label8 
      Caption         =   "工号"
      ForeColor       =   &H00FF0000&
      Height          =   165
      Left            =   375
      TabIndex        =   44
      Top             =   975
      Width           =   390
   End
   Begin VB.Label Label7 
      Caption         =   "填表聘用日期"
      ForeColor       =   &H00FF0000&
      Height          =   165
      Left            =   5625
      TabIndex        =   42
      Top             =   1050
      Width           =   1140
   End
End
Attribute VB_Name = "frmEmployeeQuery1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmbFieldName_Click()
  If cmbFieldName.Text = "工号" Or cmbFieldName.Text = "担保人业务工号" Then
     cmbCompare.Clear
     cmbCompare.AddItem "="
     cmbCompare.AddItem ">="
     cmbCompare.AddItem "<="
     
     Label1.Visible = False
     Label2.Visible = False
     DTPicker1.Visible = False
     DTPicker2.Visible = False
     
     Label4.Visible = True
     Label5.Visible = True
     cmbCompare.Visible = True
     txtData.Visible = True
  End If
   
  If cmbFieldName.Text = "姓名" Or cmbFieldName.Text = "担保人姓名" Then
     cmbCompare.Clear
     cmbCompare.AddItem "="
     cmbCompare.AddItem "Like"
     
     Label1.Visible = False
     Label2.Visible = False
     DTPicker1.Visible = False
     DTPicker2.Visible = False
     
     Label4.Visible = True
     Label5.Visible = True
     cmbCompare.Visible = True
     txtData.Visible = True
  End If
   
  If cmbFieldName.Text = "性别" Or cmbFieldName.Text = "身份证号码" Then
     cmbCompare.Clear
     cmbCompare.AddItem "="
     
     Label1.Visible = False
     Label2.Visible = False
     DTPicker1.Visible = False
     DTPicker2.Visible = False
     
     Label4.Visible = True
     Label5.Visible = True
     cmbCompare.Visible = True
     txtData.Visible = True
  End If
   
  If cmbFieldName.Text = "填表聘用日期" Or cmbFieldName.Text = "出生年月" Then
     Label1.Visible = True
     Label2.Visible = True
     DTPicker1.Visible = True
     DTPicker2.Visible = True
     
     Label4.Visible = False
     Label5.Visible = False
     cmbCompare.Visible = False
     txtData.Visible = False
  End If
End Sub

Private Sub cmdClose_Click()
  Unload Me
End Sub

Private Sub cmdFirst_Click()
On Error GoTo ErrorHandle
  Adodc1.Recordset.MoveFirst
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdLast_Click()
On Error GoTo ErrorHandle
  Adodc1.Recordset.MoveLast
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdNext_Click()
On Error GoTo ErrorHandle
  With Adodc1.Recordset
    .MoveNext
    If .EOF Then
       .MovePrevious
    End If
  End With
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdPrevious_Click()
On Error GoTo ErrorHandle
  With Adodc1.Recordset
    .MovePrevious
    If .BOF Then
       .MoveNext
    End If
  End With
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdQuery_Click()
On Error GoTo ErrMsg

  Dim Sql As String

  If cmbFieldName.Text = "工号" Or cmbFieldName.Text = "担保人业务工号" Then
     If cmbCompare.Text = "" And txtData.Text = "" Then
        MsgBox "比较符号和比较数据栏不能为空!"
        Exit Sub
     End If
     
     Sql = "select * from 员工详细资料 where " & Trim(cmbFieldName.Text) & " " & _
           Trim(cmbCompare.Text) & " '" & Trim(txtData.Text) & "'"
     Adodc1.RecordSource = Sql
     Adodc1.Refresh
     If Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "找不到符合条件的记录!"
        Sql = "select * from 员工详细资料"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
        Exit Sub
     End If
  End If
  
  If cmbFieldName.Text = "姓名" Or cmbFieldName.Text = "担保人姓名" Then
     If cmbCompare.Text = "" And txtData.Text = "" Then
        MsgBox "比较符号和比较数据栏不能为空!"
        Exit Sub
     End If
     
     If cmbCompare.Text = "Like" Then
        Sql = "select * from 员工详细资料 where " & Trim(cmbFieldName.Text) & " " & _
              Trim(cmbCompare.Text) & " '%" & Trim(txtData.Text) & "%'"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
     End If
     
     If cmbCompare.Text = "=" Then
        Sql = "select * from 员工详细资料 where " & Trim(cmbFieldName.Text) & " " & _
              Trim(cmbCompare.Text) & " '" & Trim(txtData.Text) & "'"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
     End If
     
     If Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "找不到符合条件的记录!"
        Sql = "select * from 员工详细资料"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
        Exit Sub
     End If
  End If
  
  If cmbFieldName.Text = "性别" Or cmbFieldName.Text = "身份证号码" Then
     If cmbCompare.Text = "" And txtData.Text = "" Then
        MsgBox "比较符号和比较数据栏不能为空!"
        Exit Sub
     End If
     
     Sql = "select * from 员工详细资料 where " & Trim(cmbFieldName.Text) & " " & _
           Trim(cmbCompare.Text) & " '" & Trim(txtData.Text) & "'"
     Adodc1.RecordSource = Sql
     Adodc1.Refresh
     If Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "找不到符合条件的记录!"
        Sql = "select * from 员工详细资料"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
        Exit Sub
     End If
  End If
  
  If cmbFieldName.Text = "填表聘用日期" Or cmbFieldName.Text = "出生年月" Then
     Sql = "select * from 员工详细资料 where " & Trim(cmbFieldName.Text) & " between #" & DTPicker1.Value & _
           "# and #" & DTPicker2.Value & "#"
     Adodc1.RecordSource = Sql
     Adodc1.Refresh
     If Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "找不到符合条件的记录!"
        Sql = "select * from 员工详细资料"
        Adodc1.RecordSource = Sql
        Adodc1.Refresh
        Exit Sub
     End If
  End If
  
  Exit Sub
ErrMsg:
  MsgBox Err.Description
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
  Select Case Button.Key
  Case "First"
    cmdFirst_Click
  Case "Next"
    cmdNext_Click
  Case "Previous"
    cmdPrevious_Click
  Case "Last"
    cmdLast_Click
  Case "Query"
    cmdQuery_Click
  Case "Close"
    cmdClose_Click
  End Select
End Sub

⌨️ 快捷键说明

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