📄 frmcj3.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmcj3
BackColor = &H00FFC0FF&
BorderStyle = 1 'Fixed Single
Caption = "成绩设置"
ClientHeight = 4875
ClientLeft = 45
ClientTop = 330
ClientWidth = 5850
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4875
ScaleWidth = 5850
Begin VB.Frame Frame1
BackColor = &H00FFC0FF&
Caption = "成绩设置"
Height = 3495
Left = 240
TabIndex = 1
Top = 1080
Width = 5295
Begin VB.CommandButton Command2
Caption = "返回"
Height = 375
Left = 3240
TabIndex = 5
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 960
TabIndex = 4
Top = 2760
Width = 1095
End
Begin VB.TextBox Text1
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Index = 1
Left = 2160
TabIndex = 3
Top = 1680
Width = 1815
End
Begin VB.TextBox Text1
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 465
Index = 0
Left = 2160
TabIndex = 2
Top = 720
Width = 1815
End
Begin VB.Label Label1
BackColor = &H00FFC0FF&
Caption = "学号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 1200
TabIndex = 7
Top = 720
Width = 975
End
Begin VB.Label Label2
BackColor = &H00FFC0FF&
Caption = "课程号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 1200
TabIndex = 6
Top = 1680
Width = 975
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4440
Top = 240
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = "he"
Password = "he"
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label3
BackColor = &H00FFC0FF&
Caption = "成绩查询"
BeginProperty Font
Name = "楷体_GB2312"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 615
Left = 1440
TabIndex = 0
Top = 240
Width = 3495
End
End
Attribute VB_Name = "frmcj3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1(0).Text = "" Then
MsgBox "学号不能为空", vbExclamation + vbOKOnly, "警告"
Text1(0).SetFocus
Exit Sub
End If
str = "choose.sno='" & Trim(Text1(0).Text) & "'"
If Text1(1).Text = "" Then
MsgBox "课程号不能为空", vbExclamation + vbOKOnly, "警告"
Text1(1).SetFocus
Exit Sub
End If
str1 = "choose.cno='" & Trim(Text1(1).Text) & "'"
Adodc1.ConnectionString = "Provider=MSDAORA.1;User ID=he;Persist Security Info=False"
sql = "select * from choose where " & str & " and " & str1
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = sql
Adodc1.Refresh
If Adodc1.Recordset.EOF = True Then
MsgBox "对不起,该学号的学生没有此项成绩!", vbOKOnly, "查询"
Text1(0).SetFocus
Exit Sub
End If
msql = "select choose.sno,choose.cno,choose.grade,course.cname,course.teacher,course.profession from choose,course where " & str & " and " & str1 & " and choose.cno=course.cno"
frmcj1.printstr = msql
cjfind = True
frmcj1.Show
frmcj1.Caption = "成绩查询结果"
frmcj1.cjshowtitle
frmcj1.cjshowdata
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Activate()
cjfind = True
End Sub
Private Sub Form_LostFocus()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
cjfind = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -