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

📄 员工信息删除.frm

📁 利用VB对公司人事管理系统的部分功能的描述
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form11 
   Caption         =   "Form11"
   ClientHeight    =   4815
   ClientLeft      =   60
   ClientTop       =   420
   ClientWidth     =   8040
   LinkTopic       =   "Form11"
   ScaleHeight     =   4815
   ScaleWidth      =   8040
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      Caption         =   "操 作"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1455
      Left            =   1800
      TabIndex        =   19
      Top             =   3240
      Width           =   4575
      Begin VB.CommandButton Command1 
         Caption         =   "删除员工信息"
         Height          =   375
         Left            =   720
         TabIndex        =   21
         Top             =   600
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取 消"
         Height          =   375
         Left            =   3000
         TabIndex        =   20
         Top             =   600
         Width           =   975
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "员工信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2895
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   7575
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1080
         TabIndex        =   9
         Top             =   480
         Width           =   1215
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   3480
         TabIndex        =   8
         Top             =   480
         Width           =   1215
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   6120
         TabIndex        =   7
         Top             =   480
         Width           =   735
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1080
         TabIndex        =   6
         Top             =   1080
         Width           =   975
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   3480
         TabIndex        =   5
         Top             =   1080
         Width           =   1335
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   6120
         TabIndex        =   4
         Top             =   1080
         Width           =   1215
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Left            =   1080
         TabIndex        =   3
         Top             =   1680
         Width           =   1455
      End
      Begin VB.TextBox Text8 
         Height          =   375
         Left            =   4080
         TabIndex        =   2
         Top             =   1680
         Width           =   3255
      End
      Begin VB.TextBox Text9 
         Height          =   375
         Left            =   1200
         TabIndex        =   1
         Top             =   2280
         Width           =   2775
      End
      Begin VB.Label Label1 
         Caption         =   "职工号"
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   600
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "姓 名"
         Height          =   255
         Left            =   2760
         TabIndex        =   17
         Top             =   600
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "性 别"
         Height          =   255
         Left            =   5400
         TabIndex        =   16
         Top             =   600
         Width           =   495
      End
      Begin VB.Label Label4 
         Caption         =   "年 龄"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1200
         Width           =   495
      End
      Begin VB.Label Label5 
         Caption         =   "籍 贯"
         Height          =   255
         Left            =   2760
         TabIndex        =   14
         Top             =   1200
         Width           =   495
      End
      Begin VB.Label Label6 
         Caption         =   "学 历"
         Height          =   255
         Left            =   5400
         TabIndex        =   13
         Top             =   1200
         Width           =   495
      End
      Begin VB.Label Label7 
         Caption         =   "职 称"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   1800
         Width           =   495
      End
      Begin VB.Label Label8 
         Caption         =   "家庭地址"
         Height          =   255
         Left            =   3120
         TabIndex        =   11
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label9 
         Caption         =   "联系电话"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   2400
         Width           =   735
      End
   End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rst As New ADODB.Recordset '定义Recordset对象
Dim strSql As String
Private Sub Command1_Click()
    If rst.State = adStateOpen Then
       rst.Close
    End If
    strSql = "delete from ygxx where 职工号='" & Text1.Text & "'"
    rst.Open strSql, cnn, 1, 1
    MsgBox "成功删除该员工信息!", vbInformation + vbOKOnly + vbApplicationModal, "提示"
    Call Form5.Info
    Unload Me
    Form5.Show
End Sub

Private Sub Command2_Click()
  Unload Me
  Form5.Show
End Sub

⌨️ 快捷键说明

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