证件查询.frm

来自「功能齐全的图书管理系统。包含设计文档」· FRM 代码 · 共 85 行

FRM
85
字号
VERSION 5.00
Begin VB.Form 证件查询 
   Caption         =   "查询用户信息"
   ClientHeight    =   3495
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   3495
   ScaleWidth      =   5775
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   2160
      TabIndex        =   2
      Text            =   "000001"
      Top             =   1800
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   1440
      TabIndex        =   1
      Top             =   2400
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   3360
      TabIndex        =   0
      Top             =   2400
      Width           =   855
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "请输入需要查询的借书证号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   1440
      TabIndex        =   3
      Top             =   720
      Width           =   2775
   End
End
Attribute VB_Name = "证件查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
    MsgBox "数据输入不完整,请重新输入!", vbOKOnly, "输入错误!"
    Exit Sub
End If
Set Myrs = New ADODB.Recordset
msql = "select * from 用户信息 where 借书证号= '" + Text1.Text + "'"
Myrs.Open msql, Mycon, adOpenStatic, adLockReadOnly
If Myrs.RecordCount = 0 Then
    MsgBox "该借书证号没有记录!"
    Exit Sub
Else
    Set 主界面.DataGrid1.DataSource = Myrs
    主界面.DataGrid1.Refresh
    Unload Me
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.Show
End Sub

⌨️ 快捷键说明

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