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

📄 frmdeleteyginfo.frm

📁  随着计算机应用的普及
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDeleteyginfo 
   Caption         =   "删除员工信息"
   ClientHeight    =   3780
   ClientLeft      =   60
   ClientTop       =   510
   ClientWidth     =   6420
   LinkTopic       =   "Form1"
   ScaleHeight     =   3780
   ScaleWidth      =   6420
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   4560
      TabIndex        =   2
      Top             =   1800
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "删除"
      Height          =   495
      Left            =   4560
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   1080
      TabIndex        =   0
      Top             =   1200
      Width           =   2175
   End
   Begin VB.Label Label1 
      Caption         =   "请输入要删除的员工的编号:"
      Height          =   375
      Left            =   600
      TabIndex        =   3
      Top             =   600
      Width           =   2535
   End
End
Attribute VB_Name = "frmDeleteyginfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
 Dim MsgText As String


Private Sub Command2_Click()
 Unload Me
End Sub
Private Sub Command1_Click()
Dim txtSQL As String
On Error GoTo er
Set mrc = New ADODB.Recordset
With mrc
.ActiveConnection = cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
 End With
MsgBox "员工信息删除成功!"
txtSQL = "delete from 员工信息表 where ygid= '" & Text1.Text & "'"
mrc.Open txtSQL
'txtSQL = "execute myproc"
'mrc.Open txtSQL
Set DataGrid1.DataSource = mrc
DataGrid1.ReBind
If isAdding Then isAdding = False
Exit Sub
er:
MsgBox Err.Description
End Sub


⌨️ 快捷键说明

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