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

📄 frm_im_que.frm

📁 《SQL Server 2000课程设计案例精编》-李昆-源代码-3436
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_im_que 
   Caption         =   "删除入库信息"
   ClientHeight    =   3690
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5490
   LinkTopic       =   "Form1"
   ScaleHeight     =   3690
   ScaleWidth      =   5490
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame frameMain 
      Height          =   2535
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   4935
      Begin VB.TextBox Import_name 
         Height          =   285
         Left            =   1320
         TabIndex        =   10
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Import_type 
         Height          =   285
         Left            =   1320
         TabIndex        =   9
         Top             =   720
         Width           =   975
      End
      Begin VB.TextBox Import_time 
         Height          =   285
         Left            =   1320
         TabIndex        =   8
         Top             =   1800
         Width           =   975
      End
      Begin VB.TextBox Import_price 
         Height          =   285
         Left            =   1320
         TabIndex        =   7
         Top             =   1440
         Width           =   975
      End
      Begin VB.TextBox Import_num 
         Height          =   285
         Left            =   1320
         TabIndex        =   6
         Top             =   1080
         Width           =   975
      End
      Begin VB.TextBox Prodcom 
         Height          =   285
         Left            =   3720
         TabIndex        =   5
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Prodplace 
         Height          =   285
         Left            =   3720
         TabIndex        =   4
         Top             =   720
         Width           =   975
      End
      Begin VB.TextBox Buyer 
         Height          =   285
         Left            =   3720
         TabIndex        =   3
         Top             =   1080
         Width           =   975
      End
      Begin VB.TextBox Checker 
         Height          =   285
         Left            =   3720
         TabIndex        =   2
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "入库药品名称"
         Height          =   255
         Left            =   120
         TabIndex        =   19
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "入库药品类型"
         Height          =   255
         Left            =   120
         TabIndex        =   18
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "入库时间"
         Height          =   255
         Left            =   120
         TabIndex        =   17
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "入库药品价格"
         Height          =   255
         Left            =   120
         TabIndex        =   16
         Top             =   1440
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "入库药品数量"
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Label Label6 
         Caption         =   "生产厂家"
         Height          =   255
         Left            =   2520
         TabIndex        =   14
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "产地"
         Height          =   255
         Left            =   2520
         TabIndex        =   13
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label8 
         Caption         =   "采购员"
         Height          =   255
         Left            =   2520
         TabIndex        =   12
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "验收员"
         Height          =   255
         Left            =   2520
         TabIndex        =   11
         Top             =   1440
         Width           =   1095
      End
   End
   Begin VB.Frame Frameup 
      Height          =   735
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   4935
      Begin VB.CommandButton Cmd_Query 
         Caption         =   "查询"
         Height          =   315
         Left            =   3840
         TabIndex        =   22
         Top             =   240
         Width           =   855
      End
      Begin VB.TextBox import_del_que 
         Height          =   285
         Left            =   2160
         TabIndex        =   20
         Top             =   240
         Width           =   1455
      End
      Begin VB.Label Label10 
         Caption         =   "输入入库药品名称"
         Height          =   255
         Left            =   360
         TabIndex        =   21
         Top             =   240
         Width           =   1695
      End
   End
End
Attribute VB_Name = "frm_im_que"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub Fault_Click()
    Unload Me
End Sub

Private Sub Cmd_Query_Click()
Dim strSQL As String
   If Trim(import_del_que.Text) = "" Then
   MsgBox "输入的药品名称不能为空!", vbOKOnly
     Exit Sub
   End If

  Dim QueName As String
  '得到想要查询的入库药品名称
  QueName = import_del_que.Text
  
  OpenDB

  
  strSQL = "SELECT * FROM Drug_import WHERE Import_name =" _
      + Trim(Str(QueName))
  objRS.Open strSQL, objConn, adOpenDynamic, adLockOptimistic
  
  '如果没有找到查询的药品名称,则提示
  If objRS.EOF Then
    MsgBox "没有该药品的入库信息!", vbOKOnly
    objRS.Close
    CloseDB
    
     Exit Sub
  
  '如果找到了该药品的信息,则将查询到的内容显示在窗口中
  Else
    Import_name.Text = objRS.Fields(1).Value
    Import_type.Text = objRS.Fields(2).Value
    Import_num.Text = Str(objRS.Fields(3).Value)
    Import_price.Text = Str(objRS.Fields(4).Value)
    Import_time.Text = Str(objRS.Fields(5).Value)
    Prodcom.Text = objRS.Fields(6).Value
    Prodplace.Text = objRS.Fields(7).Value
    Buyer.Text = objRS.Fields(8).Value
    Checker.Text = objRS.Fields(9).Value

  End If

  objRS.Close
  CloseDB

End Sub


⌨️ 快捷键说明

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