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

📄 frmaddbooktype.frm

📁 这是我和同学编嘚图书馆管理信息系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmAddBooktype 
   Caption         =   "书籍类别"
   ClientHeight    =   5415
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   3855
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5415
   ScaleWidth      =   3855
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtAddBookTypeMemo 
      Height          =   2055
      Left            =   240
      TabIndex        =   8
      Top             =   2400
      Width           =   3135
   End
   Begin VB.TextBox txtAddBookTypeKey 
      Height          =   375
      Left            =   1440
      TabIndex        =   6
      Top             =   1320
      Width           =   1815
   End
   Begin VB.TextBox txtAddBookTypeName 
      Height          =   375
      Left            =   1440
      TabIndex        =   4
      Top             =   720
      Width           =   1815
   End
   Begin VB.CommandButton cmdBookTypeSave 
      Caption         =   "保存 (&S)"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   4680
      Width           =   1215
   End
   Begin VB.CommandButton cmdBookTypeExit 
      Caption         =   "返回 (&X)"
      Height          =   375
      Left            =   2160
      TabIndex        =   0
      Top             =   4680
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "*"
      ForeColor       =   &H000040C0&
      Height          =   255
      Left            =   3360
      TabIndex        =   9
      Top             =   840
      Width           =   255
   End
   Begin VB.Label Label11 
      Caption         =   "备注"
      Height          =   375
      Left            =   240
      TabIndex        =   7
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "关键字"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "图书类型"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "带*为必添字段"
      ForeColor       =   &H000040C0&
      Height          =   375
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   2535
   End
End
Attribute VB_Name = "frmAddBooktype"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub cmdBookTypeExit_Click()
        Unload Me
End Sub




Private Sub cmdBookTypeSave_Click()
       Set rsRecordSet = New ADODB.Recordset
       strsql = "Select * From booktype where typename ='" & txtAddBookTypeName & "'"
       rsRecordSet.Open strsql, connConnection, adOpenKeyset, adLockPessimistic
       If rsRecordSet.EOF Then
                rsRecordSet.AddNew
                rsRecordSet.Fields("typeName").Value = txtAddBookTypeName.Text
                rsRecordSet("keyword").Value = txtAddBookTypeKey.Text
                rsRecordSet("memo").Value = txtAddBookTypeMemo.Text
                rsRecordSet.Update
                Else
                 MsgBox "图书类型名已经存在!", , "Error"
                txtAddBookTypeName.SetFocus
                Exit Sub
                
                '添加成功,给出提示并询问用户是否继续填写
                Dim x As Integer
                x = MsgBox("添加成功,是否继续添加", vbYesNo, "Successful")
                If x = 6 Then
                        frmAddBooktype.Show
                        txtAddBookTypeName.Text = ""
                        txtAddBookTypeKey.Text = ""
                        txtAddBookTypeMemo.Text = ""
                        txtAddBookTypeName.SetFocus
                Else
                      
                        Unload Me
                End If
        End If
        
        
End Sub




Private Sub txtAddBookTypeName_LostFocus()
        If txtAddBookTypeName.Text = "" Then
                MsgBox "带*为必添字段", , "Error"
                txtAddBookTypeName.SetFocus
        End If
End Sub

⌨️ 快捷键说明

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