📄 stusearch.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form StuSearch
BorderStyle = 3 'Fixed Dialog
Caption = "学生信息查询"
ClientHeight = 5505
ClientLeft = 45
ClientTop = 330
ClientWidth = 7860
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5505
ScaleWidth = 7860
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MSDataGridLib.DataGrid StuDG
Bindings = "StuSearch.frx":0000
Height = 3735
Left = 120
Negotiate = -1 'True
TabIndex = 3
Top = 1440
Width = 7575
_ExtentX = 13361
_ExtentY = 6588
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 7
BeginProperty Column00
DataField = "XH"
Caption = "学号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "XM"
Caption = "姓名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "XBM"
Caption = "性别"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "CSSJ"
Caption = "出生日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "ZY"
Caption = "专业"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "ZXF"
Caption = "总学分"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "BZ"
Caption = "备注"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
EndProperty
BeginProperty Column05
EndProperty
BeginProperty Column06
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc StuADO
Height = 330
Left = 120
Top = 5160
Width = 7575
_ExtentX = 13361
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=XSCJ;Data Source=DCR"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=XSCJ;Data Source=DCR"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from XS,CXB where XS.XB=CXB.XB"
Caption = "学生信息"
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.Frame Frame1
Caption = "输入查询条件"
Height = 735
Left = 120
TabIndex = 0
Top = 600
Width = 7575
Begin VB.ComboBox StuZY
Height = 300
ItemData = "StuSearch.frx":0015
Left = 4680
List = "StuSearch.frx":001F
TabIndex = 8
Text = "所有专业"
Top = 240
Width = 1695
End
Begin VB.CommandButton StuSch
Caption = "查询"
Height = 320
Left = 6480
TabIndex = 4
Top = 240
Width = 975
End
Begin VB.TextBox StuXM
Height = 320
Left = 2520
TabIndex = 2
Top = 240
Width = 1695
End
Begin VB.TextBox StuXH
Height = 320
Left = 480
TabIndex = 1
Top = 240
Width = 1575
End
Begin VB.Label Label1
Caption = "专业"
Height = 255
Index = 2
Left = 4320
TabIndex = 7
Top = 320
Width = 495
End
Begin VB.Label Label1
Caption = "姓名"
Height = 255
Index = 1
Left = 2160
TabIndex = 6
Top = 320
Width = 495
End
Begin VB.Label Label1
Caption = "学号"
Height = 255
Index = 0
Left = 120
TabIndex = 5
Top = 320
Width = 495
End
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "学生信息查询"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2880
TabIndex = 9
Top = 120
Width = 2070
End
End
Attribute VB_Name = "StuSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SqlStr As String
Public Sub MakeSqlStr()
SqlStr = ""
If Trim(StuXH) <> "" Then
SqlStr = "and XH like '%" + Trim(StuXH.Text) + "%'"
End If
If Trim(StuXM) <> "" Then
SqlStr = SqlStr + " and XM like '%" + Trim(StuXM.Text) + "%'"
End If
If Trim(StuZY) <> "所有专业" Then
SqlStr = SqlStr + " and ZY = '" + Trim(StuZY.Text) + "'"
End If
End Sub
Private Sub StuDG_DblClick()
ShowStuKC.StuKCADO.RecordSource = "select * from XS,KC,XS_KC" _
& " Where XS.XH = XS_KC.XH And KC.KCH = XS_KC.KCH" _
& " and XS.XH='" + StuADO.Recordset("XH") + "'"
ShowStuKC.StuKCADO.Refresh
ShowStuKC.Show
StuSearch.Enabled = False
End Sub
Private Sub StuZY_Click()
MakeSqlStr
StuADO.RecordSource = "select * from XS,CXB where XS.XB=CXB.XB " + SqlStr + " and ZY = '" + Trim(StuZY.Text) + "'"
StuADO.Refresh
End Sub
Private Sub StuSch_Click()
MakeSqlStr
StuADO.RecordSource = "select * from XS,CXB where XS.XB=CXB.XB " + SqlStr
StuADO.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -