【VB开源代码栏目提醒】:网学会员为需要VB开源代码的朋友们搜集整理了Frmclasskecheng1.frm相关资料,希望对各位网友有所帮助!
VERSION 5.00
Begin VB.Form Frmclasskecheng1
BorderStyle = 1 'Fixed Single
Caption = "班级课程设置"
ClientHeight = 6450
ClientLeft = 3345
ClientTop = 1020
ClientWidth = 5460
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6450
ScaleWidth = 5460
Begin VB.Frame Frame1
Caption = "班级课程设置"
Height = 6255
Left = 0
TabIndex = 0
Top = 120
Width = 5415
Begin VB.CommandButton Command4
Height = 735
Left = 2460
Picture = "Frmclasskecheng1.frx":0000
Style = 1 'Graphical
TabIndex = 13
Top = 3240
Width = 495
End
Begin VB.CommandButton Command3
Height = 855
Left = 2460
Picture = "Frmclasskecheng1.frx":0442
Style = 1 'Graphical
TabIndex = 12
Top = 2400
Width = 495
End
Begin VB.CommandButton Command2
Caption = "取消设置"
Height = 375
Left = 3600
TabIndex = 11
Top = 5760
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定设置"
Height = 375
Left = 600
TabIndex = 10
Top = 5760
Width = 1095
End
Begin VB.Frame Frame7
Caption = "年制:"
Height = 615
Left = 120
TabIndex = 9
Top = 840
Width = 2055
Begin VB.ComboBox Combo1
BackColor = &H80000018&
Height = 300
Index = 2
Left = 120
TabIndex = 15
Top = 200
Width = 1815
End
End
Begin VB.Frame Frame6
Caption = "所选科目"
Height = 4095
Left = 3120
TabIndex = 7
Top = 1560
Width = 2175
Begin VB.ListBox List2
BackColor = &H80000018&
Height = 3630
ItemData = "Frmclasskecheng1.frx":0884
Left = 120
List = "Frmclasskecheng1.frx":0886
Style = 1 'Checkbox
TabIndex = 8
Top = 240
Width = 1935
End
End
Begin
VB.Frame Frame5
Caption = "所有科目"
Height = 4095
Left = 120
TabIndex = 5
Top = 1560
Width = 2175
Begin VB.ListBox List1
BackColor = &H80000018&
Height = 3630
ItemData = "Frmclasskecheng1.frx":0888
Left = 120
List = "Frmclasskecheng1.frx":088A
Style = 1 'Checkbox
TabIndex = 6
Top = 240
Width = 1935
End
End
Begin VB.Frame Frame4
Caption = "学期:"
Height = 615
Left = 2400
TabIndex = 4
Top = 840
Width = 2895
Begin VB.ComboBox Combo1
BackColor = &H80000018&
Height = 300
Index = 3
Left = 120
TabIndex = 16
Top = 200
Width = 2655
End
End
Begin VB.Frame Frame3
Caption = "专业:"
Height = 615
Left = 2400
TabIndex = 3
Top = 240
Width = 1695
Begin VB.ComboBox Combo1
BackColor = &H80000018&
Height = 300
Index = 1
Left = 120
TabIndex = 14
Top = 200
Width = 1455
End
End
Begin VB.Frame Frame2
Caption = "年级:"
Height = 615
Left = 120
TabIndex = 1
Top = 240
Width = 2055
Begin VB.ComboBox Combo1
BackColor = &H80000018&
Height = 300
Index = 0
Left = 120
TabIndex = 2
Top = 200
Width = 1815
End
End
End
End
Attribute VB_Name = "Frmclasskecheng1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub MSF1_Click()
End Sub
Private Sub Combo1_Click(Index As Integer)
Dim mrc As ADODB.Recordset
If Index = 0 Then
txtsql = "select DISTINCT 专业 from class where 年级='" & Trim(Combo1(0).Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
Combo1(1).Text = ""
Combo1(2).Text = ""
Exit Sub
End If
Combo1(1).Clear
mrc.MoveFirst
Do Until mrc.EOF
Combo1(1).AddItem mrc.Fields(0)
mrc.MoveNext
Loop
Combo1(1).ListIndex = 0
txtsql = "select DISTINCT 年制 from class where 年级='" & Trim(Combo1(0).Text) & "' and 专业='" & Trim(Combo1(1).Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
Combo1(2).Text = ""
Exit Sub
End If
Combo1(2).Clear
mrc.MoveFirst
Do Until mrc.EOF
Combo1(2).AddItem mrc.Fields(0)
mrc.MoveNext
Loop
Combo1(2).ListIndex = 0
ElseIf Index = 1 Then
txtsql = "select DISTINCT 年制 from class where 年级='" & Trim(Combo1(0).Text) & "' and 专业='" & Trim(Combo1(1).Text) & "'"
Set mrc = ExecuteSQL(txt
sql)
If mrc.EOF = True Then
Combo1(0).Text = ""
Combo1(2).Text = ""
Exit Sub
End If
Combo1(2).Clear
mrc.MoveFirst
Do Until mrc.EOF
Combo1(2).AddItem mrc.Fields(0)
mrc.MoveNext
Loop
Combo1(2).ListIndex = 0
End If
End Sub
Private Sub Combo1_DropDown(Index As Integer)
If Index = 0 Then
Dim mrc As ADODB.Recordset
txtsql = "select DISTINCT 年级 from class "
Set mrc = ExecuteSQL(txtsql)
mrc.MoveFirst
Combo1(0).Clear
Do While Not mrc.EOF
Combo1(0).AddItem mrc.Fields(0)
mrc.MoveNext
Loop
Combo1(0).ListIndex = 0
End If
End Sub
Private Sub Command1_Click()
qxstr = Executeqx(4)
If qxstr = "readonly" Then
ss = MsgBox("对不起,你是只读用户不能添加记录,请与管理员联系!", vbInformation + vbOKOnly, " 警告")
Exit Sub
End If
If List2.ListCount = 0 Then
ssss = MsgBox("你还没有选择
课程!", vbInfo