?? cjsc.frm
字號(hào):
VERSION 5.00
Begin VB.Form 成績(jī)刪除
Caption = "成績(jī)管理-成績(jī)刪除"
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 = "學(xué)號(hào)"
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 = "成績(jī)"
Height = 225
Left = 150
TabIndex = 4
Top = 330
Width = 615
End
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "成 績(jī) 刪 除"
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 = "成績(jī)刪除"
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 " 學(xué)號(hào)為空,請(qǐng)輸入學(xué)號(hào)!", vbExclamation + vbOKOnly, "警告"
Text1.SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox " 課程為空,請(qǐng)輸入課程!", 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 學(xué)生成績(jī) where 學(xué)號(hào)='" & Trim(Text1.Text) & "' and 課程號(hào)='" & Trim(kcdm) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 此學(xué)生不存在該門課程的成績(jī)!", 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 " 無課程記錄,無法繼續(xù)操作!", vbExclamation + vbOKOnly, "警告"
Exit Sub
End If
Do While Not mrc.EOF
Combo1.AddItem mrc.Fields(1)
mrc.MoveNext
Loop
mrc.Close
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -