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

📄 form6.frm

📁 学生成绩管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1440
      TabIndex        =   0
      Top             =   1920
      Width           =   1695
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "班级:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   480
      TabIndex        =   18
      Top             =   1200
      Width           =   990
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "选择要删除的数据:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   600
      TabIndex        =   16
      Top             =   240
      Width           =   4860
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "计算机:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   4680
      TabIndex        =   13
      Top             =   2760
      Width           =   1170
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "C语言:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   4920
      TabIndex        =   12
      Top             =   2040
      Width           =   1170
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "物理:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   5040
      TabIndex        =   11
      Top             =   1200
      Width           =   990
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "英语:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   480
      TabIndex        =   10
      Top             =   4200
      Width           =   990
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "高数:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   480
      TabIndex        =   9
      Top             =   3480
      Width           =   990
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   480
      TabIndex        =   8
      Top             =   2760
      Width           =   990
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "学号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   480
      TabIndex        =   7
      Top             =   2040
      Width           =   990
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Const ConnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DATA.mdb;Persist Security Info=False"


Private Sub Form_Load()
Dim strSql As String
Set Conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Conn.Open ConnStr
strSql = "select * from 成绩表 "
rs.Open strSql, Conn, adOpenKeyset, adLockPessimistic
Text8.Text = rs.Fields("班级")
Text1.Text = rs.Fields("学号")
Text2.Text = rs.Fields("姓名")
Text3.Text = rs.Fields("高数")
Text4.Text = rs.Fields("英语")
Text5.Text = rs.Fields("物理")
Text6.Text = rs.Fields("C语言")
Text7.Text = rs.Fields("计算机")
End Sub

Private Sub Form_Unload(Cancel As Integer)
rs.Close
Conn.Close
End Sub

Private Sub 取消_Click()
Visible = False
Form2.Visible = True
Unload Form6
End Sub


Private Sub 确定_Click()
Dim strSql As String
Set Conn1 = New ADODB.Connection
Set rs1 = New ADODB.Recordset
Conn1.Open ConnStr
strSql = "select * from 成绩表 where 班级='" & Text8.Text & "' and 姓名='" & Text2.Text & "'"
rs1.Open strSql, Conn1, adOpenKeyset, adLockPessimistic
While Not rs1.EOF
rs1.Delete
rs1.MoveNext
Wend
rs1.Close
Conn1.Close
Call Form_Load
End Sub

Private Sub 上一个_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
MsgBox "这是第一条记录!"
End If
Text8.Text = rs.Fields("班级")
Text1.Text = rs.Fields("学号")
Text2.Text = rs.Fields("姓名")
Text3.Text = rs.Fields("高数")
Text4.Text = rs.Fields("英语")
Text5.Text = rs.Fields("物理")
Text6.Text = rs.Fields("C语言")
Text7.Text = rs.Fields("计算机")
End Sub

Private Sub 下一个_Click()
rs.MoveNext
If rs.EOF Then
rs.MoveLast
MsgBox "这是最后一条记录!"
End If
Text8.Text = rs.Fields("班级")
Text1.Text = rs.Fields("学号")
Text2.Text = rs.Fields("姓名")
Text3.Text = rs.Fields("高数")
Text4.Text = rs.Fields("英语")
Text5.Text = rs.Fields("物理")
Text6.Text = rs.Fields("C语言")
Text7.Text = rs.Fields("计算机")
End Sub

⌨️ 快捷键说明

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