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

📄 form1.frm

📁 VB 和 SQL相结合的。图书查询管理软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   240
      Width           =   2055
   End
   Begin VB.TextBox Text5 
      DataField       =   "定价"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   9
      Top             =   3360
      Width           =   1575
   End
   Begin VB.TextBox Text4 
      DataField       =   "购买日期"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   8
      Top             =   2520
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      DataField       =   "类型"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   7
      Top             =   1740
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      DataField       =   "书名"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   6
      Top             =   960
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      DataField       =   "编号"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2640
      TabIndex        =   5
      Top             =   240
      Width           =   1575
   End
   Begin VB.Image Image1 
      Height          =   3660
      Left            =   10200
      Picture         =   "Form1.frx":0457
      Stretch         =   -1  'True
      Top             =   240
      Width           =   3045
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "定价"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   720
      TabIndex        =   4
      Top             =   3480
      Width           =   975
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "购买日期"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   615
      Left            =   720
      TabIndex        =   3
      Top             =   2520
      Width           =   975
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "类型"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "书名"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   720
      TabIndex        =   1
      Top             =   1020
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFF00&
      BackStyle       =   0  'Transparent
      Caption         =   "编号"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   720
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo adderr
    Text1.SetFocus '得到焦点
    Adodc1.Recordset.AddNew
    Exit Sub
adderr:

    MsgBox Err.Description

End Sub

Private Sub Command2_Click()
On Error GoTo deleteerr



    If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then

     If MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then

     Adodc1.Recordset.Delete

     Adodc1.Recordset.MoveNext

       If Adodc1.Recordset.EOF Then
        Adodc1.Recordset.MoveLast

       End If

     End If

End If

Exit Sub

deleteerr:

    MsgBox Err.Description


End Sub

Private Sub Command3_Click()
If Adodc1.Recordset.EOF Then
MsgBox "记录空", vbOKCancel + vbQuestion
 End
Else
Adodc1.Recordset.MoveFirst
End If



End Sub

Private Sub Command4_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
MsgBox "这是第一条记录", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveFirst
End If





End Sub

Private Sub Command5_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox " 这是最后一条记录", vbOKCancel + vbQuestion

Adodc1.Recordset.MoveLast
End If








End Sub

Private Sub Command6_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "记录空", vbOKCancel + vbQuestion
End
Else

Adodc1.Recordset.MoveLast

End If

End Sub

Private Sub Command7_Click()
 
Unload Me  'Form1.Hide

End Sub

⌨️ 快捷键说明

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