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

📄 frmsrchbookinfo.frm

📁 该压缩包包含有很多关于数据库原理与应用的课件以及课程设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSrchBookInfo 
   Caption         =   "图书查询信息"
   ClientHeight    =   5325
   ClientLeft      =   120
   ClientTop       =   420
   ClientWidth     =   7500
   LinkTopic       =   "Form2"
   MDIChild        =   -1  'True
   ScaleHeight     =   5325
   ScaleWidth      =   7500
   WindowState     =   2  'Maximized
   Begin VB.TextBox txtCatId 
      Height          =   375
      Left            =   2400
      TabIndex        =   10
      Text            =   "Text1"
      Top             =   4080
      Width           =   2295
   End
   Begin VB.TextBox txtPubId 
      Height          =   375
      Left            =   2400
      TabIndex        =   8
      Text            =   "Text1"
      Top             =   3240
      Width           =   2295
   End
   Begin VB.TextBox txtAuthor 
      Height          =   375
      Left            =   2400
      TabIndex        =   6
      Text            =   "Text1"
      Top             =   2520
      Width           =   2295
   End
   Begin VB.TextBox txtBookName 
      Height          =   495
      Left            =   2400
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   1680
      Width           =   2415
   End
   Begin VB.Frame Frame1 
      Caption         =   "输入图书编号然后回车"
      Height          =   975
      Left            =   480
      TabIndex        =   0
      Top             =   480
      Width           =   5535
      Begin VB.CommandButton cmdBookOpen 
         Caption         =   "..."
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4560
         TabIndex        =   11
         Top             =   480
         Width           =   615
      End
      Begin VB.TextBox txtBookId 
         Height          =   390
         Left            =   1920
         TabIndex        =   2
         Text            =   "Text1"
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label1 
         Caption         =   "图书编号"
         BeginProperty Font 
            Name            =   "微软雅黑"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   1575
      End
   End
   Begin VB.Label Label5 
      Caption         =   "图书分类"
      BeginProperty Font 
         Name            =   "微软雅黑"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   9
      Top             =   4080
      Width           =   1455
   End
   Begin VB.Label Label4 
      Caption         =   "出版商编号"
      BeginProperty Font 
         Name            =   "微软雅黑"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   7
      Top             =   3240
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "作者"
      BeginProperty Font 
         Name            =   "微软雅黑"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   5
      Top             =   2520
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "图书名称"
      BeginProperty Font 
         Name            =   "微软雅黑"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   3
      Top             =   1680
      Width           =   1455
   End
End
Attribute VB_Name = "frmSrchBookInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Txtbookid_KeyPress(KeyAscii As Integer)
Dim BookNo As String
BookNo = txtBookId.Text
'判断是否是回车键
If KeyAscii = 13 Then
    clear
    If Not IsNumeric(BookNo) Then
        MsgBox "Invalid search key entered", vbCritical, "Search Error"
        Call clear
        Exit Sub
    End If
    
    rsBookInfo.MoveFirst
    For i = 0 To rsBookInfo.RecordCount
        If rsBookInfo.EOF = True Then
            Exit For
        End If
        '返回图书信息
        If rsBookInfo(0) = Val(Trim$(BookNo)) Then
            txtBookName.Text = rsBookInfo(1)
            txtAuthor.Text = rsBookInfo(2)
            txtPubId.Text = rsBookInfo(3)
            txtCatId.Text = rsBookInfo(4)
            Exit For
        End If
        rsBookInfo.MoveNext
    Next
    If txtBookName.Text = "" Then
    MsgBox "Book Not in Stock", vbInformation, "Search Not Found"
    'cmdSave.Enabled = False
    clear
    End If
End If
End Sub

⌨️ 快捷键说明

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