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

📄 kqcx.frm

📁 一个关于企业工资管理的数据库应用的例子。
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   404.787
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   540.284
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   975.118
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   750.047
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   645.165
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column12 
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column13 
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column14 
            ColumnWidth     =   1154.835
         EndProperty
         BeginProperty Column15 
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关闭(&C)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5040
      TabIndex        =   8
      Top             =   120
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询(&Q)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   720
      TabIndex        =   7
      Top             =   120
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   1215
      Left            =   120
      TabIndex        =   0
      Top             =   720
      Width           =   6735
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         Left            =   5160
         TabIndex        =   13
         Top             =   480
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         Left            =   1800
         TabIndex        =   12
         Top             =   480
         Width           =   1455
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option2"
         Height          =   255
         Left            =   3600
         TabIndex        =   3
         Top             =   600
         Width           =   255
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Option1"
         Height          =   255
         Left            =   120
         TabIndex        =   1
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "按所在部门:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3840
         TabIndex        =   4
         Top             =   600
         Width           =   1455
      End
      Begin VB.Label Label1 
         Caption         =   "按员工编号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   360
         TabIndex        =   2
         Top             =   600
         Width           =   1455
      End
   End
   Begin VB.Label Label5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2520
      TabIndex        =   10
      Top             =   4920
      Width           =   375
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "条"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3000
      TabIndex        =   6
      Top             =   4920
      Width           =   285
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "当前查询记录共:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   120
      TabIndex        =   5
      Top             =   4920
      Width           =   2280
   End
End
Attribute VB_Name = "kqcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'Adodc1.Caption = "当前查询记录共:" & Adodc1.Recordset.AbsolutePosition & Space(3) & "记录总数:" & Adodc1.Recordset.RecordCount
'End Sub

Private Sub Command1_Click()
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.Open "DSN=qygzgl"
Dim sql As String
If Option1.value = True Then
sql = "select * from 员工考勤 where 员工编号='" & Text1.Text & "'"
Else
    'If Option3.value = True Then
      ' sql = "select * from 员工工资表 where 计发时间='" & Text2.Text & "'"
   ' Else
sql = "select * from 员工考勤 where 所在部门='" & Text2.Text & "'"
   ' End If
End If
rs.CursorLocation = adUseClient
rs.Open sql, conn
Set DataGrid1.DataSource = rs
If rs.RecordCount = 0 Then
MsgBox ("没有符合条件的记录!")
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub command3_click()
Set DataReport5.DataSource = DataGrid1.DataSource
 DataReport5.Show
End Sub

'Private Sub Form_Load()
'Dim conn As New ADODB.Connection
'conn.Open "DSN=qygzgl"
'rs1.CursorLocation = adUseClient
'If rs1.State = adStateClosed Then
 '   rs1.Open "部门管理", conn, adOpenKeyset, adLockPessimistic, adCmdTable
'End If
'Set DataCombo2.RowSource = rs1
'DataCombo2.BoundColumn = "部门名称"
'DataCombo2.ListField = "部门名称"

'If rs2.State = adstateclose Then
   ' rs2.Open "员工工资表", conn, adOpenKeyset, adLockPessimistic, adCmdTable
'End If
'Set text1..RowSource = rs2
'DataCombo1.BoundColumn = "员工编号"
'DataCombo1.ListField = "员工编号"
'End Sub

Private Sub Option1_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub

Private Sub Option2_Click()
Text1.Text = ""
Text2.Text = ""
Text2.SetFocus
End Sub

⌨️ 快捷键说明

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