📄 frmchaxun.frm
字号:
VERSION 5.00
Begin VB.Form frmchaxun
Caption = "Form1"
ClientHeight = 4725
ClientLeft = 60
ClientTop = 345
ClientWidth = 7185
LinkTopic = "Form1"
ScaleHeight = 4725
ScaleWidth = 7185
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
DataField = "所选课程"
DataSource = "Data1"
Height = 495
Left = 2400
TabIndex = 10
Top = 2040
Width = 1695
End
Begin VB.Data Data1
Caption = "选课"
Connect = "Access 2000;"
DatabaseName = "D:\05226shixun\student.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 1695
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "student"
Top = 2760
Width = 6615
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 4320
TabIndex = 9
Top = 2040
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "选课结果"
Height = 495
Left = 720
TabIndex = 8
Top = 2040
Width = 1455
End
Begin VB.Frame Frame1
Caption = "请选择查询条件"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1815
Left = 120
TabIndex = 0
Top = 120
Width = 6855
Begin VB.TextBox Text2
DataField = "学号"
DataSource = "Data1"
Height = 495
Left = 4080
TabIndex = 7
Top = 1080
Width = 2535
End
Begin VB.ComboBox Combo5
Height = 300
Left = 2040
TabIndex = 6
Text = "Combo5"
Top = 1200
Width = 1815
End
Begin VB.ComboBox Combo4
Height = 300
Left = 120
TabIndex = 5
Text = "Combo4"
Top = 1200
Width = 1695
End
Begin VB.ComboBox Combo3
Height = 300
Left = 120
TabIndex = 4
Text = "Combo3"
Top = 720
Width = 1695
End
Begin VB.TextBox Text1
DataField = "姓名"
DataSource = "Data1"
Height = 495
Left = 4080
TabIndex = 3
Top = 240
Width = 2535
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2040
TabIndex = 2
Text = "Combo2"
Top = 240
Width = 1815
End
Begin VB.ComboBox Combo1
Height = 300
Left = 120
TabIndex = 1
Text = "Combo1"
Top = 240
Width = 1695
End
End
End
Attribute VB_Name = "frmchaxun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strCon1 As String
Dim strCon2 As String
If Trim(Text1.Text) = "" Or Trim(Text2.Text) = "" Then
MsgBox "please input query condition!", vbInformation, "提示"
End If
Select Case Trim(Combo1.Text)
Case "学号"
strCon1 = "serial"
Case "姓名"
strCon1 = "name"
Case "班级"
strCon1 = "Class"
Case "性别"
strCon1 = "Sex"
End Select
Select Case Trim(Combo4.Text)
Case "学号"
strCon2 = "Serial"
Case "姓名"
strCon2 = "Name"
Case "班级"
strCon2 = "Class"
End Select
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
'添加Combo1的子项作为查询标准
Combo1.AddItem ("班级")
Combo1.AddItem ("学号")
Combo1.AddItem ("姓名")
Combo1.AddItem ("性别")
Combo1.ListIndex = 2
'添加Combo2的子项作为关系符
Combo2.AddItem ("=")
Combo2.AddItem (">")
Combo2.AddItem (">=")
Combo2.AddItem ("<")
Combo2.AddItem ("<=")
Combo2.AddItem ("<>")
Combo2.ListIndex = 0
'添加Combo3的子项作为逻辑连接符
Combo3.AddItem ("And")
Combo3.AddItem ("Or")
Combo3.ListIndex = 0
'添加Combo4的子项作为第二种查询标准
Combo4.AddItem ("班级")
Combo4.AddItem ("姓名")
Combo4.AddItem ("学号")
Combo4.AddItem ("性别")
Combo4.ListIndex = 2
'添加Combo5的子项作为第二种关系符
Combo5.AddItem ("=")
Combo5.AddItem (">")
Combo5.AddItem (">=")
Combo5.AddItem ("<")
Combo5.AddItem ("<=")
Combo5.AddItem ("<>")
Combo5.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -