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

📄 查看库存信息.frm

📁 图书馆管理系统的实现
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            DataField       =   "book_num"
            DataSource      =   "a"
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   5040
            TabIndex        =   23
            Top             =   323
            Width           =   2295
         End
         Begin VB.Label Label9 
            AutoSize        =   -1  'True
            Caption         =   "图书数量:"
            Height          =   180
            Left            =   4200
            TabIndex        =   22
            Top             =   360
            Width           =   810
         End
         Begin VB.Label Label8 
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            DataField       =   "book_name"
            DataSource      =   "a"
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   1680
            TabIndex        =   21
            Top             =   1080
            Width           =   2295
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            Caption         =   "图书名称:"
            Height          =   180
            Left            =   720
            TabIndex        =   20
            Top             =   1117
            Width           =   810
         End
         Begin VB.Label Label6 
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            DataField       =   "book_id"
            DataSource      =   "a"
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   1680
            TabIndex        =   19
            Top             =   720
            Width           =   2295
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            Caption         =   "图书编号:"
            Height          =   180
            Left            =   720
            TabIndex        =   18
            Top             =   757
            Width           =   810
         End
         Begin VB.Label Label4 
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            DataField       =   "kucun_id"
            DataSource      =   "a"
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   1680
            TabIndex        =   17
            Top             =   323
            Width           =   2295
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "库存编号:"
            Height          =   180
            Left            =   720
            TabIndex        =   16
            Top             =   360
            Width           =   810
         End
      End
      Begin VB.Frame frmFarmeKuCun 
         Caption         =   "查找记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   1455
         Left            =   120
         TabIndex        =   10
         Top             =   3120
         Width           =   7815
         Begin VB.CommandButton 取消查找 
            Caption         =   "取消"
            Height          =   375
            Left            =   5880
            TabIndex        =   4
            Top             =   720
            Width           =   1215
         End
         Begin VB.CommandButton 查找确定 
            Caption         =   "确定"
            Height          =   375
            Left            =   5880
            TabIndex        =   3
            Top             =   240
            Width           =   1215
         End
         Begin VB.TextBox Txingming 
            Appearance      =   0  'Flat
            Height          =   270
            Left            =   3840
            TabIndex        =   2
            Top             =   720
            Width           =   1695
         End
         Begin VB.TextBox Tbianhao 
            Appearance      =   0  'Flat
            Height          =   270
            Left            =   3840
            TabIndex        =   1
            Top             =   360
            Width           =   1695
         End
         Begin VB.OptionButton 按姓名查找 
            Caption         =   "按名称查找"
            Height          =   375
            Left            =   1200
            Style           =   1  'Graphical
            TabIndex        =   12
            Top             =   720
            Width           =   1215
         End
         Begin VB.OptionButton 按编号查找 
            Caption         =   "按编号查找"
            Height          =   375
            Left            =   1200
            Style           =   1  'Graphical
            TabIndex        =   11
            Top             =   240
            Value           =   -1  'True
            Width           =   1215
         End
         Begin VB.Image Image1 
            Height          =   735
            Left            =   240
            Picture         =   "查看库存信息.frx":059A
            Top             =   360
            Width           =   795
         End
         Begin VB.Label Label13 
            AutoSize        =   -1  'True
            Caption         =   "提示:本查询支持模糊查询"
            ForeColor       =   &H00FF0000&
            Height          =   180
            Left            =   4560
            TabIndex        =   30
            Top             =   1200
            Width           =   2160
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "请输入名称:"
            Height          =   180
            Left            =   2640
            TabIndex        =   14
            Top             =   720
            Width           =   1080
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "请输入编号:"
            Height          =   180
            Left            =   2640
            TabIndex        =   13
            Top             =   360
            Width           =   1080
         End
      End
   End
End
Attribute VB_Name = "FrmFindKuCun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub a_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If a.Recordset.RecordCount = 0 Then
    第0条 = "无记录"
    共0条.Visible = False
Else
    共0条.Visible = True
    第0条 = "第" & a.Recordset.AbsolutePosition & "条"
    共0条 = "共" & a.Recordset.RecordCount & "条"
End If
End Sub

Private Sub Form_Load()
    FrmFindKuCun.Left = 1000
    FrmFindKuCun.Top = 66
    FrmFindKuCun.Height = 6600
    FrmFindKuCun.Width = 10125
    Txingming.Enabled = False
End Sub

Private Sub 按编号查找_Click()
    Tbianhao.Enabled = True
    Txingming.Enabled = False
    Tbianhao.SetFocus
End Sub

Private Sub 按姓名查找_Click()
    Txingming.Enabled = True
    Tbianhao.Enabled = False
    Txingming.SetFocus
End Sub


Private Sub 查找确定_Click()

If 按编号查找.Value = True Then
    If Tbianhao = "" Then
        MsgBox "请输入所要查找的图书编号", vbInformation, "出错提示"
        Exit Sub
    End If
    If IsNumeric(Tbianhao) = False Then
            MsgBox "请输入数字", vbInformation, "出错提示"
            Exit Sub
       Else
        a.RecordSource = "select * from kucun where book_id=" & Tbianhao
        End If
        Else
a.RecordSource = "select * from kucun where book_name like '%" & Txingming & "%'"
         End If
         a.Refresh
End Sub

Private Sub 第一条_Click()
If a.Recordset.RecordCount = 0 Then Exit Sub
a.Recordset.MoveFirst
End Sub

Private Sub 取消查找_Click()
a.RecordSource = "select * from kucun"
a.Refresh
Tbianhao = ""
Txingming = ""
End Sub

Private Sub 上一条_Click()
If a.Recordset.RecordCount = 0 Then Exit Sub
If a.Recordset.AbsolutePosition = 1 Then
a.Recordset.MoveFirst
Else
a.Recordset.MovePrevious
End If
End Sub

Private Sub 退出_Click()
Unload Me
End Sub

Private Sub 下一条_Click()
If a.Recordset.RecordCount = 0 Then Exit Sub
If a.Recordset.AbsolutePosition = a.Recordset.RecordCount Then
    a.Recordset.MoveLast
Else
    a.Recordset.MoveNext
End If
End Sub

Private Sub 最后一条_Click()
If a.Recordset.RecordCount = 0 Then Exit Sub
a.Recordset.MoveLast
End Sub

⌨️ 快捷键说明

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