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

📄 form2.frm

📁 人事系统源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "员工基本信息"
   ClientHeight    =   4095
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6660
   LinkTopic       =   "Form2"
   ScaleHeight     =   4095
   ScaleWidth      =   6660
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command7 
      Caption         =   ">|"
      Height          =   495
      Left            =   3480
      Style           =   1  'Graphical
      TabIndex        =   17
      Top             =   2880
      Width           =   615
   End
   Begin VB.CommandButton Command6 
      Caption         =   ">"
      Height          =   495
      Left            =   2880
      TabIndex        =   16
      Top             =   2880
      Width           =   615
   End
   Begin VB.CommandButton Command5 
      Caption         =   "<"
      Height          =   495
      Left            =   2280
      TabIndex        =   15
      Top             =   2880
      Width           =   615
   End
   Begin VB.CommandButton Command4 
      Caption         =   "|<"
      Height          =   495
      Left            =   1680
      TabIndex        =   14
      Top             =   2880
      Width           =   615
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   495
      Left            =   4680
      TabIndex        =   13
      Top             =   3480
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "更新"
      Height          =   495
      Left            =   2520
      TabIndex        =   12
      Top             =   3480
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   495
      Left            =   360
      TabIndex        =   11
      Top             =   3480
      Width           =   1215
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1920
      TabIndex        =   9
      Top             =   2400
      Width           =   1815
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1920
      TabIndex        =   8
      Top             =   1830
      Width           =   1815
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1920
      TabIndex        =   7
      Top             =   1320
      Width           =   1815
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1920
      TabIndex        =   6
      Top             =   690
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1920
      TabIndex        =   5
      Top             =   120
      Width           =   1815
   End
   Begin VB.Label Label6 
      Caption         =   "时间格式:20070127"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   4080
      TabIndex        =   10
      Top             =   2520
      Width           =   1815
   End
   Begin VB.Label Label5 
      Caption         =   "参加工作时间"
      Height          =   375
      Left            =   240
      TabIndex        =   4
      Top             =   2520
      Width           =   1695
   End
   Begin VB.Label Label4 
      Caption         =   "岗位编号"
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   1380
      Width           =   1695
   End
   Begin VB.Label Label3 
      Caption         =   "职称"
      Height          =   375
      Left            =   240
      TabIndex        =   2
      Top             =   1950
      Width           =   1695
   End
   Begin VB.Label Label2 
      Caption         =   "姓名"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   810
      Width           =   1695
   End
   Begin VB.Label Label1 
      Caption         =   "编号"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   1695
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
If Text1.Text <> "" Then
  Form1.Adodc1.Recordset.AddNew
Else
  a = MsgBox("请输入编号信息", , "警告")
End If
End Sub

Private Sub Command4_Click()
Form1.Adodc1.Refresh
Form1.Adodc1.Recordset.MoveFirst

End Sub

Private Sub Command5_Click()

If Not Form1.Adodc1.Recordset.BOF Then Form1.Adodc1.Recordset.MovePrevious
End Sub

Private Sub Command6_Click()

If Not Form1.Adodc1.Recordset.EOF Then Form1.Adodc1.Recordset.MoveNext

End Sub

Private Sub Command7_Click()
Form1.Adodc1.Refresh
Form1.Adodc1.Recordset.MoveLast
End Sub



Private Sub Form_Activate()
Form1.Adodc1.RecordSource = "员工基本信息表"
Form1.Adodc1.Refresh
Set Text1.DataSource = Form1.Adodc1
Text1.DataField = "编号"
Set Text2.DataSource = Form1.Adodc1
Text2.DataField = "姓名"
Set Text3.DataSource = Form1.Adodc1
Text3.DataField = "岗位编号"
Set Text4.DataSource = Form1.Adodc1
Text4.DataField = "职称"
Set Text5.DataSource = Form1.Adodc1
Text5.DataField = "参加工作时间"
End Sub



Private Sub Command2_Click()
If Text1.Text = "" Then
  MsgBox ("请选择数据")
Else
  a = MsgBox("确认要更新!", 1, "警告")
End If
If a = 1 Then Form1.Adodc1.Recordset.Update
End Sub

Private Sub Command3_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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