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

📄 abmcx.frm

📁 引用枕善居网站上的职工工资系统
💻 FRM
字号:
VERSION 5.00
Object = "{1FB3F7AD-7B17-4DC8-AC0E-35123A4CF9C5}#1.0#0"; "WinXPC Engine.ocx"
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frm部门查询 
   Caption         =   "按部门查询"
   ClientHeight    =   5130
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8925
   ControlBox      =   0   'False
   Icon            =   "abmcx.frx":0000
   LinkTopic       =   "Form12"
   MDIChild        =   -1  'True
   MouseIcon       =   "abmcx.frx":3072
   ScaleHeight     =   5130
   ScaleWidth      =   8925
   Begin VB.CommandButton Command8 
      Caption         =   "打印报表"
      Height          =   315
      Left            =   5400
      TabIndex        =   12
      Top             =   100
      Width           =   1095
   End
   Begin VB.CommandButton Command7 
      Caption         =   "最小化(&M)"
      Height          =   315
      Left            =   4680
      MouseIcon       =   "abmcx.frx":3D3C
      TabIndex        =   11
      ToolTipText     =   "最小化窗体"
      Top             =   4320
      Width           =   975
   End
   Begin VB.CommandButton Command6 
      Caption         =   "最大化(&S)"
      Height          =   315
      Left            =   5760
      MouseIcon       =   "abmcx.frx":4A06
      TabIndex        =   10
      ToolTipText     =   "最大化窗体"
      Top             =   4320
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Alignment       =   1  'Right Justify
      DataField       =   "实发"
      DataSource      =   "Data1"
      Height          =   270
      Left            =   4320
      Locked          =   -1  'True
      TabIndex        =   8
      Top             =   120
      Width           =   915
   End
   Begin VB.CommandButton Command5 
      Caption         =   "返 回(&X)"
      Height          =   315
      Left            =   6840
      MouseIcon       =   "abmcx.frx":56D0
      TabIndex        =   6
      ToolTipText     =   "返回主窗体"
      Top             =   4320
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "下一记录 >"
      Height          =   315
      Left            =   2280
      MouseIcon       =   "abmcx.frx":639A
      TabIndex        =   4
      Top             =   4320
      Width           =   1050
   End
   Begin VB.CommandButton Command2 
      Caption         =   "< 前一记录"
      Height          =   315
      Left            =   1230
      MouseIcon       =   "abmcx.frx":7064
      TabIndex        =   3
      Top             =   4320
      Width           =   1050
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查  找"
      Height          =   315
      Left            =   250
      MouseIcon       =   "abmcx.frx":7D2E
      TabIndex        =   2
      Top             =   4320
      Width           =   975
   End
   Begin VB.CommandButton Command4 
      Caption         =   "全部记录"
      Height          =   315
      Left            =   3320
      MouseIcon       =   "abmcx.frx":89F8
      TabIndex        =   5
      Top             =   4320
      Width           =   975
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "H:\VB教程\zhsl\data\职工工资管理.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   6000
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "职工表"
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "abmcx.frx":96C2
      Height          =   2895
      Left            =   120
      OleObjectBlob   =   "abmcx.frx":96D6
      TabIndex        =   1
      Top             =   600
      Width           =   8175
   End
   Begin WinXPC_Engine.WindowsXPC WindowsXPC1 
      Left            =   5160
      Top             =   5040
      _ExtentX        =   6588
      _ExtentY        =   1085
      ColorScheme     =   2
   End
   Begin VB.ComboBox Combo1 
      ForeColor       =   &H00400000&
      Height          =   300
      ItemData        =   "abmcx.frx":B12D
      Left            =   1440
      List            =   "abmcx.frx":B140
      MouseIcon       =   "abmcx.frx":B174
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "实发工资为:"
      Height          =   255
      Left            =   3120
      TabIndex        =   9
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请选择部门:"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   120
      Width           =   1335
   End
End
Attribute VB_Name = "frm部门查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
  '-----声明X按钮无效------'
   Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
  Private Declare Function RemoveMenu Lib "user32" ( _
  ByVal hMenu As Long, ByVal nPosition As Long, _
  ByVal wFlags As Long) As Long
Const MF_BYCOMMAND = &H0&
Const MF_BYPOSITION = &H400&

Dim S As String, Tx As String
Dim Result As Integer
Private Sub Form_Paint()
If Me.WindowState = 0 Then
   Command6.Caption = "最大化(&S)"
   Command6.ToolTipText = "最大化窗体"
  ElseIf Me.WindowState = 2 Then
   Command6.Caption = "还原(&Z)"
   Command6.ToolTipText = "窗体还原"
  End If
End Sub


Private Sub Command6_Click()
If Me.WindowState = 2 Then
   Me.WindowState = 0
  Else
  Me.WindowState = 2
  End If
End Sub

Private Sub Command7_Click()
Me.WindowState = 1
End Sub

Private Sub Command8_Click()
DataReport1.Show '1
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\DATA\职工工资管理.mdb"
Data1.RecordSource = "职工表"
 Me.BackColor = &HD1D8DB
  '-----声明X按钮无效------'
MyMenu = GetSystemMenu(Me.hwnd, 0)
 RemoveMenu MyMenu, &HF060, MF_BYCOMMAND


WindowsXPC1.InitSubClassing

End Sub

Private Sub Form_Resize()
On Error Resume Next
DBGrid1.Height = Me.Height - 1700
DBGrid1.Width = Me.Width - 550
DBGrid1.Left = 240
DBGrid1.Top = 600
Command1.Top = DBGrid1.Height + 800
'Command1.Left = 840
Command2.Top = DBGrid1.Height + 800
'Command1.Left = 3320
Command3.Top = DBGrid1.Height + 800
'Command1.Left = 5810
Command4.Top = DBGrid1.Height + 800
'Command1.Left = 8280
Command5.Top = DBGrid1.Height + 800
Command5.Left = Me.Width - 1300
Command6.Top = DBGrid1.Height + 800
Command6.Left = Me.Width - 2275
Command7.Top = DBGrid1.Height + 800
Command7.Left = Me.Width - 3255
End Sub
' 查找第一条符合条件的记录
Private Sub Command1_Click()
Command2.Enabled = True
Command3.Enabled = True
Data1.RecordSource = "Select * from 职工表 Where [部门] Like" + "'" + Combo1.Text + "*" + "'"
Data1.Refresh
   If Text2 = "" Then
      Result = MsgBox("没有该部门记录,是否查找其他记录 ?", vbOKCancel + vbQuestion)
      Command2.Enabled = False
      Command3.Enabled = False
      If Result = 1 Then
        Combo1.Text = ""
        Combo1.SetFocus
         Else
       Unload Me
      End If
    End If

End Sub
' 查找上一条符合条件的记录
Private Sub Command2_Click()
Command3.Enabled = True
Data1.Recordset.MovePrevious
Data1.RecordSource = "Select * from 职工表 Where [部门] Like" + "'" + Combo1.Text + "*" + "'"
If Text2 = "" Then
      Result = MsgBox("已经是第一条记录,是否查找其他记录 ?", vbOKCancel + vbQuestion)
      Command2.Enabled = False
      If Result = 1 Then
          Exit Sub
        Else
       Unload Me
      End If
    End If
End Sub
' 查找下一条符合条件的记录
Private Sub Command3_Click()
Command2.Enabled = True
Data1.Recordset.MoveNext
Data1.RecordSource = "Select * from 职工表 Where [部门] Like" + "'" + Combo1.Text + "*" + "'"
  If Text2 = "" Then
      Result = MsgBox("已经是最后一条记录,是否查找其他记录 ?", vbOKCancel + vbQuestion)
      Command3.Enabled = False
      If Result = 1 Then
         Exit Sub
        Else
       Unload Me
      End If
    End If
End Sub
Private Sub Command4_Click()
' 显示全部记录
Command2.Enabled = True
Command3.Enabled = True
Data1.RecordSource = "Select * from 职工表"
Data1.Refresh
End Sub
Private Sub Command5_Click()
Unload Me
End Sub





⌨️ 快捷键说明

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