【正文】
pwd=Call ShowDataEnd SubPrivate Sub ShowData() = (姓名).Value = (教師編號(hào)).Value = (性別).Value39。pwd= select * from 教師表, DSN=db1。 DSN=db1。 amp。 Command4(0).Enabled = True Command4(1).Enabled = True Command4(2).Enabled = True Command4(3).Enabled = True End SelectEnd SubPrivate Sub Command5_Click()End SubPrivate Sub Form_Load()Set n = New Set Rs = New DRIVER=Microsoft Access Driver (*.mdb)。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 39。 amp。 Command4(0).Enabled = False Case 2 39。pwd=, 3, 3Select Case IndexCase 0 39。pwd=, 3, 3If = 0 ThenMsgBox 此表不存在這個(gè)姓名!ElseSelect Case IndexCase 0 Call ShowData Case 1 Call ShowData Case 2 Call ShowDataCase 3 Call ShowDataEnd SelectEnd IfEnd SubPrivate Sub Command4_Click(Index As Integer) select * from 教師表, DSN=db1。, DSN=db1。 amp。 39。User ID=。 39。 amp。pwd=, 3, 3Dim n%n = Val() Select Case Index Case 0 Call ShowData Command1(1).Enabled = False Command1(2).Enabled = True Command1(3).Enabled = True Case 1 Call ShowData Command1(0).Enabled = True Command1(1).Enabled = True Command1(2).Enabled = True Command1(3).Enabled = True Case 2 Call ShowData Command1(0).Enabled = True Command1(1).Enabled = True Command1(2).Enabled = True Command1(3).Enabled = True Case 3 Call ShowData Command1(0).Enabled = True Command1(1).Enabled = True Command1(2).Enabled = False Command1(3).Enabled = True Case 4 If n Then MsgBox 此表沒有那么多記錄! Else (n) Call ShowData End If End Select End SubPrivate Sub Command2_Click(Index As Integer) select * from 教師表 where 姓名 like amp。, n, 3, 3Label12(1).Caption = (0).ValueLabel12(2).Caption = (1).ValueLabel12(3).Caption = (2).ValueEnd SubPrivate Sub ShowData() = (0).Value = (1).Value = (2).Value = (3).Value = (4).Value = (5).Value = (6).ValueEnd Sub(5) 教師查詢Option ExplicitPrivate n As New Private Rs As New Private Sub Command1_Click(Index As Integer) select * from 教師表, DSN=db1。 amp。 group by StudentID , n, 3, 3Label12(0).Caption = (0).Value select max(Score),avg(Score),min(Score) from Score where =39。 amp。 n select , , , from Student,Class,Department where = and =, n, 3, 3 select , , , from Student,Class,Department where = and =, n, 3, 3call datashow1(rs,msflexgrid1)Call ShowData select count(*) from Score where 60 and =39。 amp。Case 1End SelectEnd SubPrivate Sub Form_Load()Set n = New Set Rs = New DRIVER=Microsoft Access Driver (*.mdb)。 amp。 39。39。 amp。 39。39。 amp。 39。, n, 3, 3If = 0 ThenMsgBox 不存在這個(gè)學(xué)號(hào),請(qǐng)重新輸入! = Exit SubElseLabel12(1).Caption = (0).ValueLabel12(2).Caption = (1).ValueLabel12(3).Caption = (2).ValueEnd IfEnd If39。 amp。Label12(0).Caption = (0).Value select max(Score),avg(Score),min(Score) from Score where =39。 39。 amp。 39。 amp。 \39。DBQ= amp。 \39。DBQ= amp。 39。 amp。 CourseID like amp。 39。 amp。 \ select * from Users , n, 3, 3call datashow1(rs,msflexgrid)End Sub(3) 課程管理1)課程查詢Option ExplicitPrivate n As New Private Rs As New Private Rs1 As New Private Sub Command1_Click(Index As Integer)Select Case IndexCase 0 select * from