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

📄 frm_inf_add.frm

📁 《SQL Server 2000课程设计案例精编》-李昆-源代码-3436
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_inf_add 
   Caption         =   "添加库存药品信息"
   ClientHeight    =   2580
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7365
   LinkTopic       =   "Form1"
   ScaleHeight     =   2580
   ScaleWidth      =   7365
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Fault 
      Caption         =   "取消"
      Height          =   375
      Left            =   3840
      TabIndex        =   18
      Top             =   2160
      Width           =   1575
   End
   Begin VB.CommandButton Cmd_Add 
      Caption         =   "添加"
      Height          =   375
      Left            =   1680
      TabIndex        =   17
      Top             =   2160
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Height          =   1815
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7095
      Begin VB.TextBox Prodplace 
         Height          =   285
         Left            =   4800
         TabIndex        =   16
         Top             =   1320
         Width           =   1695
      End
      Begin VB.TextBox Prodcom 
         Height          =   285
         Left            =   4800
         TabIndex        =   14
         Top             =   960
         Width           =   1695
      End
      Begin VB.TextBox Import_time 
         Height          =   285
         Left            =   4800
         TabIndex        =   12
         Top             =   600
         Width           =   1695
      End
      Begin VB.TextBox Drug_num 
         Height          =   285
         Left            =   4800
         TabIndex        =   10
         Top             =   240
         Width           =   1695
      End
      Begin VB.TextBox Export_price 
         Height          =   285
         Left            =   1560
         TabIndex        =   8
         Top             =   1320
         Width           =   1695
      End
      Begin VB.TextBox Drug_type 
         Height          =   285
         Left            =   1560
         TabIndex        =   6
         Top             =   600
         Width           =   1695
      End
      Begin VB.TextBox Import_price 
         Height          =   285
         Left            =   1560
         TabIndex        =   4
         Top             =   960
         Width           =   1695
      End
      Begin VB.TextBox Drug_name 
         Height          =   285
         Left            =   1560
         TabIndex        =   2
         Top             =   240
         Width           =   1695
      End
      Begin VB.Label Label8 
         Caption         =   "产地"
         Height          =   255
         Left            =   3600
         TabIndex        =   15
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "生产厂商"
         Height          =   255
         Left            =   3600
         TabIndex        =   13
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label6 
         Caption         =   "入库时间"
         Height          =   375
         Left            =   3600
         TabIndex        =   11
         Top             =   600
         Width           =   1215
      End
      Begin VB.Label Label5 
         Caption         =   "药品库存量"
         Height          =   255
         Left            =   3600
         TabIndex        =   9
         Top             =   240
         Width           =   1215
      End
      Begin VB.Label Label4 
         Caption         =   "药品出库价格"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1320
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "库存药品类型"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   600
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "药品入库价格"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   960
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "库存药品名称"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   1215
      End
   End
End
Attribute VB_Name = "frm_inf_add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Cmd_Add_Click()
    
    Dim strSQL As String
    OpenDB
    strSQL = "Select * from Drug_info"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockOptimistic
    objRS.AddNew
        objRS.Fields(1).Value = Trim(Drug_name.Text)
        objRS.Fields(2).Value = Trim(Drug_type.Text)
        objRS.Fields(3).Value = Trim(Import_price.Text)
        objRS.Fields(4).Value = Trim(Export_price.Text)
        objRS.Fields(5).Value = Trim(Drug_num.Text)
        'objRS.Fields(6).Value = Trim(Import_time.Text)
        objRS.Fields(7).Value = Trim(Prodcom.Text)
        objRS.Fields(8).Value = Trim(Prodplace.Text)
    objRS.Update
    objRS.Close
    CloseDB
    MsgBox "记录已添加!", vbOKOnly
Unload Me
End Sub

Private Sub Fault_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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