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

📄 frmdelteacher.frm

📁 班主任考核管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmdelteacher 
   Caption         =   "删除班主任"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2520
      TabIndex        =   6
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   960
      TabIndex        =   5
      Top             =   2400
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2040
      TabIndex        =   4
      Text            =   "选择"
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Enabled         =   0   'False
      Height          =   300
      Left            =   2040
      TabIndex        =   3
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "姓名"
      Height          =   180
      Left            =   1080
      TabIndex        =   2
      Top             =   1800
      Width           =   360
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "班级"
      Height          =   180
      Left            =   1080
      TabIndex        =   1
      Top             =   1260
      Width           =   360
   End
   Begin VB.Label Label1 
      Caption         =   "请您选择要删除的班主任"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   960
      TabIndex        =   0
      Top             =   480
      Width           =   2820
   End
End
Attribute VB_Name = "frmdelteacher"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
   Dim mrcc As ADODB.Recordset
  Dim msgtext As String
  Dim txtSQL As String
  txtSQL = "select name1 from teacher where class='" & Trim(Combo1) & "'"
  Set mrcc = ExecuteSQL(txtSQL, msgtext)
  Text2.Text = mrcc.Fields(0)
 mrcc.Close
End Sub

Private Sub Command1_Click()
  If Combo1 = "选择" Then
     MsgBox "班级选择错误!", vbOKOnly + vbExclamation, "警告"
     Exit Sub
  End If
  Dim mrcc As ADODB.Recordset
  Dim msgtext As String
  Dim txtSQL As String
  txtSQL = "delete from teacher where class='" & Trim(Combo1) & "'"
  Set mrcc = ExecuteSQL(txtSQL, msgtext)
 Combo1 = "选择"
 Text2.Text = ""
 MsgBox "纪录已经删除!", vbOKOnly + vbExclamation, "提示"
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub

Private Sub Form_Load()
  Me.Height = 3600
  Me.Width = 4800
  Me.Top = frmmdi.Height / 2 - 2400
  Me.Left = frmmdi.Width / 2 - 2400
  Dim mrcc As ADODB.Recordset
  Dim msgtext As String
  Dim txtSQL As String
  txtSQL = "select class from teacher"
  Set mrcc = ExecuteSQL(txtSQL, msgtext)
  Do While Not mrcc.EOF
    Combo1.AddItem mrcc.Fields(0)
    mrcc.MoveNext
 Loop
 mrcc.Close

End Sub

⌨️ 快捷键说明

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