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

📄 frmupbanji.frm

📁 班主任考核管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmupbanji 
   Caption         =   "修改班级设置"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   2640
      TabIndex        =   5
      Top             =   2280
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   840
      TabIndex        =   4
      Top             =   2280
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2160
      TabIndex        =   3
      Top             =   1440
      Width           =   1575
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2160
      TabIndex        =   1
      Text            =   "选择"
      Top             =   480
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "班级人数"
      Height          =   375
      Left            =   720
      TabIndex        =   2
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "班级名称"
      Height          =   180
      Left            =   720
      TabIndex        =   0
      Top             =   480
      Width           =   720
   End
End
Attribute VB_Name = "frmupbanji"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Dim mr As ADODB.Recordset
  Dim msgtext As String
    If Trim(Combo1) = "选择" Then
    MsgBox "请选择要修改的班级名称!", vbOKOnly + vbExclamation, "警告"
     Exit Sub
  End If
  If Trim(Text1.Text & "") = "" Then
    MsgBox "请输入班级名称!", vbOKOnly + vbExclamation, "警告"
    Text1.SetFocus
     Exit Sub
  End If
  If Not IsNumeric(Trim(Text1.Text)) Then
     MsgBox "班级人数必须为数字!", vbOKOnly + vbExclamation, "警告"
     Text2.SetFocus
     Exit Sub
  End If
  txtSQL = "delete from class where id='" & Trim(Combo1) & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  txtSQL = "execute addbanji'"
  txtSQL = txtSQL & Combo1 & "','"
  txtSQL = txtSQL & Trim(Text1.Text) & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Text1.Text = ""
  Combo1 = "选择"
  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 mrccc1 As ADODB.Recordset
  Dim msgtext1 As String
  Dim txtSQL As String
  txtSQL = "select id from class"
  Set mrccc1 = ExecuteSQL(txtSQL, msgtext1)

   Do While Not mrccc1.EOF
    Combo1.AddItem mrccc1.Fields(0)
    mrccc1.MoveNext
   Loop
   mrccc1.Close
  
End Sub

⌨️ 快捷键说明

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