📄 form6.frm
字号:
VERSION 5.00
Begin VB.Form Form6
BackColor = &H0080FFFF&
Caption = "Form6"
ClientHeight = 6330
ClientLeft = 60
ClientTop = 345
ClientWidth = 7440
LinkTopic = "Form6"
ScaleHeight = 6330
ScaleWidth = 7440
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Connect = "Access"
DatabaseName = "A:\Wsm.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 360
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Stulnfo"
Top = 240
Width = 6255
End
Begin VB.TextBox Text9
DataField = "个人爱好"
DataSource = "Data1"
Height = 495
Left = 1320
TabIndex = 23
Top = 3840
Width = 5295
End
Begin VB.TextBox Text8
DataField = "其他描述"
DataSource = "Data1"
Height = 495
Left = 1320
TabIndex = 21
Top = 3120
Width = 5295
End
Begin VB.TextBox Text7
DataField = "专业"
DataSource = "Data1"
Height = 495
Left = 4080
TabIndex = 19
Top = 2400
Width = 2535
End
Begin VB.TextBox Text6
DataField = "系别"
DataSource = "Data1"
Height = 495
Left = 1320
TabIndex = 17
Top = 2400
Width = 1575
End
Begin VB.TextBox Text5
DataField = "籍贯"
DataSource = "Data1"
Height = 495
Left = 3720
TabIndex = 15
Top = 1560
Width = 2895
End
Begin VB.TextBox Text4
DataField = "性别"
DataSource = "Data1"
Height = 495
Left = 1320
TabIndex = 13
Top = 1560
Width = 1215
End
Begin VB.TextBox Text3
DataField = "年龄"
DataSource = "Data1"
Height = 495
Left = 5640
TabIndex = 11
Top = 840
Width = 975
End
Begin VB.TextBox Text2
DataField = "姓名"
DataSource = "Data1"
Height = 495
Left = 3360
TabIndex = 9
Top = 840
Width = 1455
End
Begin VB.TextBox Text1
DataField = "学号"
DataSource = "Data1"
Height = 495
Left = 1320
TabIndex = 6
Top = 840
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "返回"
Height = 1215
Left = 5520
TabIndex = 5
Top = 4680
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "相同专业"
Height = 615
Left = 3840
TabIndex = 4
Top = 4680
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "相同性别"
Height = 615
Left = 2160
TabIndex = 3
Top = 5520
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "相同籍贯"
Height = 615
Left = 360
TabIndex = 2
Top = 5520
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "相同年龄"
Height = 615
Left = 2160
TabIndex = 1
Top = 4680
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "相同系别"
Height = 615
Left = 360
TabIndex = 0
Top = 4680
Width = 1335
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "个人爱好"
Height = 495
Left = 360
TabIndex = 22
Top = 3840
Width = 975
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "其他描述"
Height = 495
Left = 360
TabIndex = 20
Top = 3120
Width = 975
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "专业"
Height = 495
Left = 3480
TabIndex = 18
Top = 2520
Width = 975
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "系别"
Height = 495
Left = 360
TabIndex = 16
Top = 2400
Width = 855
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "籍贯"
Height = 495
Left = 2760
TabIndex = 14
Top = 1560
Width = 975
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "性别"
Height = 495
Left = 360
TabIndex = 12
Top = 1560
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "年龄"
Height = 495
Left = 4920
TabIndex = 10
Top = 840
Width = 615
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "姓名"
Height = 495
Left = 2760
TabIndex = 8
Top = 840
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学号"
Height = 495
Left = 360
TabIndex = 7
Top = 840
Width = 735
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim aa As String, bb As String
aa = "请输入相同的系别" + Chr(13)
bb = InputBox$(aa, "输入窗", , 100, 100)
Data1.RecordSource = "select stulnfo.* from stulnfo where 系别 ='" & bb & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此系别!", , "提示"
Data1.RecordSource = "stulnfo"
Data1.Refresh
End If
End Sub
Private Sub Command2_Click()
Dim lx As String
lx = InputBox$("请输入相同的年龄", "查找相同特征输入窗")
Data1.RecordSource = "select stulnfo.* from stulnfo where 年龄 ='" & lx & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此年龄!", , "提示"
Data1.RecordSource = "stulnfo"
Data1.Refresh
End If
End Sub
Private Sub Command3_Click()
Dim ss As String, mm As String
ss = "请输入相同的籍贯" + Chr(13)
mm = InputBox$(ss, "输入窗", , 100, 100)
Data1.RecordSource = "select stulnfo.* from stulnfo where 籍贯='" & mm & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此籍贯!", , "提示"
Data1.RecordSource = "stulnfo"
Data1.Refresh
End If
End Sub
Private Sub Command4_Click()
Dim ll As String, ww As String
ll = "请输入相同的性别" + Chr(13)
ww = InputBox$(ll, "输入窗", , 100, 100)
Data1.RecordSource = "select stulnfo.* from stulnfo where 性别='" & ww & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此性别!", , "提示"
Data1.RecordSource = "stulnfo"
Data1.Refresh
End If
End Sub
Private Sub Command5_Click()
Dim wsm As String, xx As String
xx = "请输入相同的专业" + Chr(13)
wsm = InputBox$(xx, "输入窗", , 100, 100)
Data1.RecordSource = "select stulnfo.* from stulnfo where 专业='" & wsm & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此专业!", , "提示"
Data1.RecordSource = "stulnfo"
Data1.Refresh
End If
End Sub
Private Sub Command6_Click()
Form6.Hide
Form2.Show
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Caption = Data1.Recordset.AbsolutePosition + 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -