【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“Formjiao1.frm”一文,供大家参考学习!
VERSION 5.00
Begin VB.Form frmxuefei1
BorderStyle = 1 'Fixed Single
Caption = "学费设置"
ClientHeight = 3315
ClientLeft = 45
ClientTop = 330
ClientWidth = 6375
Icon = "Formjiao1.frx":0000
LinkTopic = "Form5"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 6375
Begin VB.Frame Frame2
Caption = "学费设置"
Height = 2535
Left = 120
TabIndex = 0
Top = 600
Width = 6135
Begin VB.ComboBox Combo1
BackColor = &H80000018&
ForeColor = &H000000FF&
Height = 300
Index = 0
Left = 1080
TabIndex = 7
Text = "Combo1"
Top = 375
Width = 1215
End
Begin VB.ComboBox Combo1
BackColor = &H80000018&
ForeColor = &H000000FF&
Height = 300
Index = 1
Left = 3360
TabIndex = 6
Text = "Combo1"
Top = 360
Width = 1215
End
Begin VB.ComboBox Combo1
BackColor = &H80000018&
ForeColor = &H000000FF&
Height = 300
Index = 2
Left = 1080
TabIndex = 5
Text = "Combo1"
Top = 840
Width = 1215
End
Begin VB.ComboBox Combo1
BackColor = &H80000018&
ForeColor = &H000000FF&
Height = 300
Index = 3
Left = 3360
TabIndex = 4
Text = "Combo1"
Top = 840
Width = 2535
End
Begin VB.TextBox Text1
BackColor = &H80000018&
ForeColor = &H000000FF&
Height = 270
Left = 1080
TabIndex = 3
Top = 1395
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 255
Left = 1080
TabIndex = 2
Top = 2160
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 255
Left = 3120
TabIndex = 1
Top = 2160
Width = 1335
End
Begin VB.Label Label6
Caption = "年制:"
Height = 255
Left = 480
TabIndex = 13
Top = 885
Width = 615
End
Begin VB.Label Label5
Caption = "学期:"
Height = 255
Left = 2760
TabIndex = 12
Top = 885
Width = 615
End
Begin VB.Label Label3
Caption = "专业:"
Height = 255
Left = 2760
TabIndex = 11
Top = 375
Width = 615
End
Begin VB.Label Label2
Caption = "年级:"
Height = 255
Left = 480
TabIndex = 10
Top = 360
Width = 615
End
Begin VB.Label Label4
Caption = "学费:"
Height = 255
Left = 480
TabIndex = 9
Top = 1440
Width = 615
End
Begin VB.Label Label7
Caption = " 元"
Height = 255
Left = 2400
TabIndex = 8
Top = 1440
Width = 615
End
End
Begin VB.Label Label1
Caption = "学费设置"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 2400
TabIndex = 14
Top = 120
Width = 1695
End
End
Attribute VB_Name = "frmxuefei1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim clas As String
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(txtsql)
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 S