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

📄 view_upd.frm

📁 仓库管理系统,使用access数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form view_upd 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "库存值修改"
   ClientHeight    =   4140
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   7110
   Icon            =   "view_upd.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4140
   ScaleWidth      =   7110
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txt_min 
      Height          =   375
      Left            =   1320
      TabIndex        =   13
      Top             =   2040
      Width           =   1695
   End
   Begin VB.ComboBox cmb_unit 
      Height          =   300
      Left            =   4440
      TabIndex        =   11
      Top             =   600
      Width           =   1695
   End
   Begin VB.TextBox txt_oprice 
      Height          =   375
      Left            =   4440
      TabIndex        =   10
      Top             =   1320
      Width           =   1695
   End
   Begin VB.TextBox txt_iprice 
      Height          =   375
      Left            =   1320
      TabIndex        =   7
      Top             =   1320
      Width           =   1695
   End
   Begin VB.TextBox txt_num 
      Height          =   375
      Left            =   1320
      TabIndex        =   6
      Top             =   600
      Width           =   1695
   End
   Begin VB.TextBox txt_name 
      Height          =   375
      Left            =   1320
      TabIndex        =   5
      Top             =   120
      Width           =   1695
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   4440
      TabIndex        =   1
      Top             =   3240
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Height          =   375
      Left            =   2040
      TabIndex        =   0
      Top             =   3240
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "库存报警值"
      Height          =   255
      Left            =   360
      TabIndex        =   12
      Top             =   2040
      Width           =   975
   End
   Begin VB.Label Label5 
      Caption         =   "售价"
      Height          =   255
      Left            =   3240
      TabIndex        =   9
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "单位"
      Height          =   255
      Left            =   3240
      TabIndex        =   8
      Top             =   720
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "进价"
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "库存数"
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   720
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "货物名称"
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "view_upd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset

Private Sub CancelButton_Click()
Unload Me
End Sub

Private Sub Form_Load()
Sql = "select unit from [unit]"
    Set RS = dbSelect(Sql)
    While Not RS.EOF
        cmb_unit.AddItem RS.Fields(0)
        RS.MoveNext
    Wend
        Set RS = Nothing
txt_name.Enabled = False
End Sub

Private Sub OKButton_Click()
'修改货物库存信息
If Me.txt_num <> "" And Me.cmb_unit <> "" And Me.txt_iprice <> "" And Me.txt_oprice <> "" And Me.txt_min <> "" Then
    Sql = "update [库存] set 库存='" & Val(Trim(Me.txt_num))
    Sql = Sql & "',单位='" & Me.cmb_unit
    Sql = Sql & "',进价='" & Val(Trim(Me.txt_iprice))
    Sql = Sql & "',售价='" & Val(Trim(Me.txt_oprice))
    Sql = Sql & "',报警值='" & Val(Trim(Me.txt_min)) & "'"
    Sql = Sql & "where 货物名称='" & txt_name.Text & "'"
    dbOperate Sql
    Unload Me
Else
    MsgBox "请将信息填写完整!"
End If
End Sub

⌨️ 快捷键说明

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