📄 frmsrchmember.frm
字号:
VERSION 5.00
Begin VB.Form frmSrchMember
Caption = "Search For Member Information"
ClientHeight = 5730
ClientLeft = 60
ClientTop = 345
ClientWidth = 7260
Icon = "frmSrchMember.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5730
ScaleWidth = 7260
WindowState = 2 'Maximized
Begin VB.TextBox txtAddress
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
Locked = -1 'True
TabIndex = 12
TabStop = 0 'False
Top = 3960
Width = 2655
End
Begin VB.TextBox txtRollNo
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
Locked = -1 'True
TabIndex = 7
TabStop = 0 'False
Top = 2160
Width = 2535
End
Begin VB.TextBox txtSex
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
Locked = -1 'True
TabIndex = 6
TabStop = 0 'False
Top = 3360
Width = 2655
End
Begin VB.TextBox txtMemName
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
Locked = -1 'True
TabIndex = 5
TabStop = 0 'False
Top = 2760
Width = 2655
End
Begin VB.Frame Frame1
Caption = "请输入图书馆编号再回车"
ForeColor = &H00FF0000&
Height = 735
Left = 480
TabIndex = 0
Top = 600
Width = 5295
Begin VB.TextBox txtLibraryId
BackColor = &H0080FFFF&
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 2640
TabIndex = 2
Top = 240
Width = 2415
End
Begin VB.Label lblLibraryId
AutoSize = -1 'True
Caption = "图书馆编号"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 240
TabIndex = 1
Top = 240
Width = 1575
End
End
Begin VB.TextBox txtClassId
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
Locked = -1 'True
TabIndex = 4
TabStop = 0 'False
Top = 1560
Width = 2535
End
Begin VB.Label lblAddress
AutoSize = -1 'True
Caption = "地址"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 13
Top = 3960
Width = 630
End
Begin VB.Label lblRollNo
AutoSize = -1 'True
Caption = "名单编号"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 11
Top = 2160
Width = 1260
End
Begin VB.Label lblInfo
Alignment = 2 'Center
BackColor = &H00000080&
Caption = "学生信息查询"
BeginProperty Font
Name = "Times New Roman"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 0
TabIndex = 10
Top = 0
Width = 5775
End
Begin VB.Label lblSex
AutoSize = -1 'True
Caption = "性别"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 9
Top = 3360
Width = 630
End
Begin VB.Label lblMemName
AutoSize = -1 'True
Caption = "学生姓名"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 8
Top = 2760
Width = 1260
End
Begin VB.Label lblClassId
AutoSize = -1 'True
Caption = "班级编号"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 720
TabIndex = 3
Top = 1560
Width = 1260
End
End
Attribute VB_Name = "frmSrchMember"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'Setting up the info. label
lblInfo.Left = Me.ScaleLeft
lblInfo.Top = Me.ScaleTop
lblInfo.Width = Screen.Width
End Sub
Private Sub Form_Activate()
clear
End Sub
'========================================================
'Database Related Code...!!!
'========================================================
'Supporting Function
'Simple clearing of textBox
Private Sub clear()
txtLibraryId.Text = ""
txtClassId.Text = ""
txtRollNo.Text = ""
txtMemName.Text = ""
txtSex.Text = ""
txtAddress.Text = ""
txtLibraryId.SetFocus
End Sub
Private Sub txtLibraryId_keypress(KeyAscii As Integer)
Dim LibraryNo As String
'assigning Srch value
LibraryNo = txtLibraryId.Text
'If enter is pressed by user than auto-generate record
If KeyAscii = 13 Then
clear
'Prompt if invalid search key is entered by user
If Not IsNumeric(LibraryNo) Then
MsgBox "Invalid Search Key Entered", vbCritical, "Search Error"
Call clear
Exit Sub
End If
rsMemberInfo.MoveFirst
For i = 0 To rsMemberInfo.RecordCount
If rsMemberInfo.EOF = True Then
Exit For
End If
If rsMemberInfo(0) = Val(Trim$(LibraryNo)) Then
txtClassId.Text = Str(rsMemberInfo(1))
txtRollNo.Text = Str(rsMemberInfo(2))
txtMemName.Text = rsMemberInfo(3)
txtSex.Text = rsMemberInfo(4)
txtAddress.Text = rsMemberInfo(5)
Exit For
End If
rsMemberInfo.MoveNext
Next
If txtClassId.Text = "" Then
MsgBox "Invalid Library Id", vbInformation, "Search Not Found"
'cmdSave.Enabled = False
clear
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -