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

📄 frmaddgoodclass.frm

📁 用vb+access库房管理开放源码 1、日常业务 药品入库 药品出库 入库退单管理 出库退单管理 2、库存管理 库存查询 库存盘点 价格管理 3、查询统计 入库查询 入库退
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmAddGoodClass 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "商品类别信息添加"
   ClientHeight    =   3060
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4245
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3060
   ScaleWidth      =   4245
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame1 
      Caption         =   "商品类别添加"
      Height          =   2775
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3975
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   375
         Left            =   600
         TabIndex        =   3
         Top             =   1680
         Width           =   855
      End
      Begin VB.TextBox txtGoodClassName 
         Height          =   270
         Left            =   600
         TabIndex        =   2
         Top             =   1080
         Width           =   2295
      End
      Begin VB.Label Label1 
         Caption         =   "请输入商品类别名称:"
         Height          =   375
         Left            =   600
         TabIndex        =   1
         Top             =   600
         Width           =   1815
      End
   End
End
Attribute VB_Name = "FrmAddGoodClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  On Error GoTo errHandle:
  Dim sql As String
  Dim goodClassRs As ADODB.Recordset
  If Me.txtGoodClassName.Text = "" Then
    MsgBox "请输入商品类别信息", vbOKOnly + vbExclamation, "错误提示"
    Me.txtGoodClassName.SetFocus
    Exit Sub
  End If
  Call condatabase '连接数据库
  sql = "select * from goodClass where goodClassName = '" & Me.txtGoodClassName.Text & "'"
  Set goodClassRs = cn.Execute(sql) '查询数据库中是否有该商品类别信息
  If Not goodClassRs.EOF Then '如果存在该商品类别
    MsgBox "对不起,你输入的商品类别已经存在,请重新输入!", vbInformation, "信息提示"
    Me.txtGoodClassName.Text = ""
    Me.txtGoodClassName.SetFocus
    Exit Sub
  End If
  'Download by http://www.codefans.net
  sql = "insert into goodClass(goodClassName) values ('" & Me.txtGoodClassName.Text & "')"
  cn.Execute (sql)
  MsgBox "商品类别信息添加成功!"
  Exit Sub
errHandle:
   MsgBox err.Description, vbExclamation, "发生了错误!"
End Sub

⌨️ 快捷键说明

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