⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsrchmember.frm

📁 图书管理系统需求规格说明书.doc
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSrchMember 
   Caption         =   "搜索"
   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       =   &H000000FF&
      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            =   "新宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   1200
         TabIndex        =   1
         Top             =   360
         Width           =   1020
      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            =   "新宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   1680
      TabIndex        =   13
      Top             =   4080
      Width           =   510
   End
   Begin VB.Label lblRollNo 
      AutoSize        =   -1  'True
      Caption         =   "序号"
      BeginProperty Font 
         Name            =   "新宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   1680
      TabIndex        =   11
      Top             =   2280
      Width           =   510
   End
   Begin VB.Label lblInfo 
      Alignment       =   2  'Center
      BackColor       =   &H00800000&
      Caption         =   "搜索会员信息"
      BeginProperty Font 
         Name            =   "新宋体"
         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            =   "新宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   1680
      TabIndex        =   9
      Top             =   3480
      Width           =   510
   End
   Begin VB.Label lblMemName 
      AutoSize        =   -1  'True
      Caption         =   "姓名"
      BeginProperty Font 
         Name            =   "新宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   1680
      TabIndex        =   8
      Top             =   2880
      Width           =   510
   End
   Begin VB.Label lblClassId 
      AutoSize        =   -1  'True
      Caption         =   "班级号"
      BeginProperty Font 
         Name            =   "新宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   1680
      TabIndex        =   3
      Top             =   1680
      Width           =   765
   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()
    '设定标签
    lblInfo.Left = Me.ScaleLeft
    lblInfo.Top = Me.ScaleTop
    lblInfo.Width = Screen.Width
End Sub

Private Sub Form_Activate()
    clear
End Sub


'========================================================
'连接数据库
'========================================================

'清空文本框
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
    
    '指派查询关键值
    LibraryNo = txtLibraryId.Text
     If KeyAscii = 13 Then
        clear
    
        If Not IsNumeric(LibraryNo) Then
            MsgBox "输入搜索关键字错误!", vbCritical, "搜索失败"
            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 "输入会员号错误!", vbInformation, "搜索失败"
            'cmdSave.Enabled = False
            clear
        End If
    End If
End Sub










⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -