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

📄 人员信息.frm

📁 中小企业员工工资管理 可自定义多个类别 数据库采用sql2000连接 默认密码1234
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form 人员信息 
   Caption         =   "人员信息"
   ClientHeight    =   6030
   ClientLeft      =   60
   ClientTop       =   510
   ClientWidth     =   15255
   LinkTopic       =   "Form1"
   ScaleHeight     =   6030
   ScaleWidth      =   15255
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton SortCommand 
      Caption         =   "排序"
      Height          =   495
      Left            =   12120
      TabIndex        =   9
      Top             =   5400
      Width           =   1215
   End
   Begin VB.ComboBox Combo2 
      DataField       =   "级别"
      DataSource      =   "Data1"
      Height          =   300
      ItemData        =   "人员信息.frx":0000
      Left            =   11640
      List            =   "人员信息.frx":0013
      TabIndex        =   7
      Text            =   "Combo2"
      Top             =   600
      Width           =   2055
   End
   Begin VB.ComboBox Combo1 
      DataField       =   "类别"
      DataSource      =   "Data1"
      Height          =   300
      ItemData        =   "人员信息.frx":0026
      Left            =   11640
      List            =   "人员信息.frx":0036
      TabIndex        =   5
      Text            =   "Combo1"
      Top             =   240
      Width           =   2055
   End
   Begin VB.CommandButton ExitCommand 
      Caption         =   "返回主窗口"
      Height          =   495
      Left            =   13680
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   5400
      Width           =   1095
   End
   Begin VB.CommandButton DeleteCommand 
      Caption         =   "删除"
      Height          =   495
      Left            =   10440
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   5400
      Width           =   1215
   End
   Begin VB.CommandButton AddCommand 
      Caption         =   "添加"
      Height          =   495
      Left            =   8640
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   5400
      Width           =   1215
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "人员信息.frx":0052
      Height          =   3975
      Left            =   840
      OleObjectBlob   =   "人员信息.frx":0066
      TabIndex        =   1
      Top             =   1080
      Width           =   14055
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   "C:\大地科贸\大地数据库.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   495
      Left            =   720
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "人员信息表"
      Top             =   240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "级别"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   10920
      TabIndex        =   8
      Top             =   600
      Width           =   615
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "类别"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   10920
      TabIndex        =   6
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "人员信息管理表"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   735
      Left            =   5760
      TabIndex        =   0
      Top             =   240
      Width           =   4455
   End
End
Attribute VB_Name = "人员信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Grid_refresh()
Data1.Recordset.Edit
Data1.Recordset.Update
End Sub
Private Sub AddCommand_Click()
If Data1.Recordset.RecordCount <> 0 Then
Data1.Recordset.MoveLast
ID = Data1.Recordset.Fields("序号").Value + 1
Else
ID = 1
End If





Data1.Recordset.AddNew
Data1.Recordset.Fields("序号").Value = ID

Data1.Recordset.Update
Data1.Recordset.MoveLast
End Sub



Private Sub Combo1_Click()
Grid_refresh


End Sub



Private Sub Combo2_Click()
Grid_refresh
End Sub



Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

With DBGrid1
If .Col = 4 Then .Col = 6
If .Col = 5 Then .Col = 3
End With

End Sub

Private Sub DeleteCommand_Click()
YesNo = MsgBox("真的要删除吗", vbYesNo + vbQuestion)
If YesNo <> vbYes Then
Exit Sub
End If

If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.Delete
Data1.Recordset.MovePrevious
End If

End Sub

Private Sub ExitCommand_Click()
Unload Me
End Sub



Private Sub SortCommand_Click()
人员排序.Show
End Sub

⌨️ 快捷键说明

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