📄 chj.frm
字号:
VERSION 5.00
Begin VB.Form chzh
BackColor = &H00800000&
Caption = "档案查询"
ClientHeight = 5160
ClientLeft = 60
ClientTop = 345
ClientWidth = 4800
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5160
ScaleWidth = 4800
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "下一个"
Height = 375
Left = 1800
TabIndex = 8
Top = 3960
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 2040
TabIndex = 6
Top = 2640
Width = 2055
End
Begin VB.TextBox Text1
Height = 270
Left = 2040
TabIndex = 4
Top = 960
Width = 2055
End
Begin VB.OptionButton Option1
BackColor = &H00800000&
Caption = "按学号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 255
Left = 240
TabIndex = 3
Top = 960
Width = 1335
End
Begin VB.OptionButton Option2
BackColor = &H00800000&
Caption = "按姓名:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 255
Left = 240
TabIndex = 2
Top = 2640
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "查 找"
Height = 375
Left = 600
TabIndex = 1
Top = 3960
Width = 855
End
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 3000
TabIndex = 0
Top = 3960
Width = 855
End
Begin VB.Label Label2
BackColor = &H00800000&
Caption = "请输入姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 255
Left = 2040
TabIndex = 7
Top = 2280
Width = 1575
End
Begin VB.Label Label1
BackColor = &H00800000&
Caption = "请输入学号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFC0C0&
Height = 255
Left = 2040
TabIndex = 5
Top = 480
Width = 1575
End
End
Attribute VB_Name = "chzh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim FindName As String
Dim FindXuehao As String
Dim Criteria As String
Dim Currentbookmark As String
If Option2.Value = True Then
FindName = chzh.Text2.Text
Currentbookmark = tjda.Data1.Recordset.Bookmark
Criteria = "姓名 = " & "'" & FindName & "'"
danb.Data1.Recordset.FindNext (Criteria)
danb.Show
chzh.Hide
If chzh.Text2.Text = "" Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
chzh.Show
ElseIf tjda.Data1.Recordset.NoMatch Then
tjda.Data1.Recordset.Bookmark = Currentbookmark
MsgBox "没有满足条件的纪录!", vbOKOnly, "查找结果"
chzh.Show
End If
ElseIf Option1.Value = True Then
FindXuehao = chzh.Text1.Text
Currentbookmark = tjda.Data1.Recordset.Bookmark
Criteria = "学号 = '" & FindXuehao & "'"
danb.Data1.Recordset.FindFirst (Criteria)
danb.Show
chzh.Hide
If chzh.Text1.Text = "" Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
chzh.Show
ElseIf tjda.Data1.Recordset.NoMatch Then
tjda.Data1.Recordset.Bookmark = Currentbookmark
MsgBox "没有满足条件的纪录!", vbOKOnly, "查找结果"
chzh.Show
End If
ElseIf Option1.Value = False And Option2.Value = False Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
End If
End Sub
Private Sub Command2_Click()
danb.Show
chzh.Hide
End Sub
Private Sub Command3_Click()
Dim FindName As String
Dim FindXuehao As String
Dim Criteria As String
Dim Currentbookmark As String
If Option2.Value = True Then
FindName = chzh.Text2.Text
Currentbookmark = tjda.Data1.Recordset.Bookmark
Criteria = "姓名 = " & "'" & FindName & "'"
danb.Data1.Recordset.FindNext (Criteria)
danb.Show
chzh.Hide
If chzh.Text2.Text = "" Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
chzh.Show
ElseIf tjda.Data1.Recordset.NoMatch Then
tjda.Data1.Recordset.Bookmark = Currentbookmark
MsgBox "没有满足条件的纪录!", vbOKOnly, "查找结果"
chzh.Show
End If
ElseIf Option1.Value = True Then
FindXuehao = chzh.Text1.Text
Currentbookmark = tjda.Data1.Recordset.Bookmark
Criteria = "学号 = '" & FindXuehao & "'"
danb.Data1.Recordset.FindFirst (Criteria)
danb.Show
chzh.Hide
If chzh.Text1.Text = "" Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
chzh.Show
ElseIf tjda.Data1.Recordset.NoMatch Then
tjda.Data1.Recordset.Bookmark = Currentbookmark
MsgBox "没有满足条件的纪录!", vbOKOnly, "查找结果"
chzh.Show
End If
ElseIf Option1.Value = False And Option2.Value = False Then
MsgBox "没有输入任何信息!", vbOKOnly + vbExclamation, "提示"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -