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

📄 cjsc.frm

📁 学生管理系统 很不错的一个课程设计 适合大学生毕业设计用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 成绩删除 
   Caption         =   "成绩管理-成绩删除"
   ClientHeight    =   2445
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form18"
   ScaleHeight     =   2445
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "输入查找信息"
      Height          =   1185
      Left            =   0
      TabIndex        =   5
      Top             =   480
      Width           =   4665
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   810
         TabIndex        =   9
         Text            =   "Text1"
         Top             =   270
         Width           =   1785
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1080
         Style           =   2  'Dropdown List
         TabIndex        =   8
         Top             =   720
         Width           =   1785
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   285
         Left            =   2910
         TabIndex        =   7
         Top             =   300
         Width           =   675
      End
      Begin VB.CommandButton Command2 
         Caption         =   "返回"
         Height          =   285
         Left            =   3780
         TabIndex        =   6
         Top             =   300
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "学号"
         Height          =   225
         Left            =   150
         TabIndex        =   11
         Top             =   330
         Width           =   435
      End
      Begin VB.Label Label3 
         Caption         =   "课程名称"
         Height          =   285
         Left            =   120
         TabIndex        =   10
         Top             =   810
         Width           =   825
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "查找信息"
      Height          =   675
      Left            =   0
      TabIndex        =   1
      Top             =   1710
      Width           =   4635
      Begin VB.TextBox Text2 
         Height          =   285
         Left            =   810
         TabIndex        =   3
         Text            =   "Text2"
         Top             =   270
         Width           =   1095
      End
      Begin VB.CommandButton Command3 
         Caption         =   "删除"
         Height          =   315
         Left            =   3780
         TabIndex        =   2
         Top             =   270
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "成绩"
         Height          =   225
         Left            =   150
         TabIndex        =   4
         Top             =   330
         Width           =   615
      End
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "成 绩 删 除"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   4545
   End
End
Attribute VB_Name = "成绩删除"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim kcdm As String
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox " 学号为空,请输入学号!", vbExclamation + vbOKOnly, "警告"
Text1.SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox " 课程为空,请输入课程!", vbExclamation + vbOKOnly, "警告"
Combo1.SetFocus
Exit Sub
End If
txtsql = "select * from 课程 where 课程名称='" & Trim(Combo1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
kcdm = Trim(mrc.Fields(0))
mrc.Close
txtsql = "select * from 学生成绩 where 学号='" & Trim(Text1.Text) & "' and 课程号='" & Trim(kcdm) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 此学生不存在该门课程的成绩!", vbExclamation + vbOKOnly, "警告"
mrc.Close
Exit Sub
End If
Text2.Text = mrc.Fields(5)
Text2.Enabled = True
Command3.Enabled = True
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
mrc.Delete
MsgBox " 删除成功!", vbExclamation + vbOKOnly, "警告"
Text1.Text = ""
Text2.Text = ""
Command3.Enabled = False
mrc.Close
End Sub

Private Sub Form_Load()
Command3.Enabled = False
Text1.Text = ""
Text2.Text = ""
txtsql = "select * from 课程"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 无课程记录,无法继续操作!", vbExclamation + vbOKOnly, "警告"
Exit Sub
End If
Do While Not mrc.EOF
Combo1.AddItem mrc.Fields(1)
mrc.MoveNext
Loop
mrc.Close
End Sub

⌨️ 快捷键说明

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