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

📄 frmoutupdate.frm

📁 这个是基于vb的物资信息管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form OutUpdate 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改出库信息"
   ClientHeight    =   5445
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6975
   Icon            =   "frmOutUpdate.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5445
   ScaleWidth      =   6975
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdClose 
      Caption         =   "退出"
      Height          =   405
      Left            =   5550
      TabIndex        =   17
      Top             =   4800
      Width           =   915
   End
   Begin VB.CommandButton cmdInfo 
      Caption         =   "详细信息"
      Height          =   405
      Left            =   4350
      TabIndex        =   16
      Top             =   4800
      Width           =   915
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查找"
      Height          =   405
      Left            =   3150
      TabIndex        =   15
      Top             =   4800
      Width           =   915
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      Height          =   405
      Left            =   1905
      TabIndex        =   14
      Top             =   4800
      Width           =   915
   End
   Begin VB.CommandButton cmdEdit 
      Caption         =   "修改"
      Height          =   405
      Left            =   690
      TabIndex        =   13
      Top             =   4800
      Width           =   915
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   4275
      Left            =   300
      TabIndex        =   0
      Top             =   270
      Width           =   6405
      _ExtentX        =   11298
      _ExtentY        =   7541
      _Version        =   393216
      Style           =   1
      Tabs            =   2
      TabHeight       =   520
      TabCaption(0)   =   "基本信息"
      TabPicture(0)   =   "frmOutUpdate.frx":014A
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Frame1"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "材料明细"
      TabPicture(1)   =   "frmOutUpdate.frx":0166
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "cmdDelRecord"
      Tab(1).Control(1)=   "MSFlexGrid1"
      Tab(1).Control(2)=   "Text7"
      Tab(1).Control(3)=   "cmdAddRecord"
      Tab(1).ControlCount=   4
      Begin VB.Frame Frame1 
         Caption         =   "出库单基本信息"
         Height          =   3525
         Left            =   210
         TabIndex        =   5
         Top             =   480
         Width           =   5985
         Begin VB.TextBox Text6 
            Height          =   315
            Left            =   1560
            TabIndex        =   24
            Top             =   2910
            Width           =   2385
         End
         Begin VB.TextBox Text5 
            Height          =   315
            Left            =   1560
            TabIndex        =   23
            Top             =   2505
            Width           =   2385
         End
         Begin VB.TextBox Text4 
            Height          =   315
            Left            =   1560
            TabIndex        =   22
            Top             =   2085
            Width           =   2385
         End
         Begin VB.TextBox Text3 
            Height          =   315
            Left            =   1560
            TabIndex        =   21
            Top             =   1650
            Width           =   2385
         End
         Begin VB.ComboBox Combo1 
            Height          =   315
            Left            =   1560
            TabIndex        =   20
            Top             =   1245
            Width           =   2385
         End
         Begin VB.TextBox Text2 
            Height          =   315
            Left            =   1560
            TabIndex        =   19
            Top             =   825
            Width           =   2385
         End
         Begin VB.TextBox Text1 
            Height          =   315
            Left            =   1560
            TabIndex        =   18
            Top             =   390
            Width           =   2385
         End
         Begin VB.Label Label1 
            Caption         =   "出库单号码"
            Height          =   255
            Left            =   420
            TabIndex        =   12
            Top             =   420
            Width           =   1065
         End
         Begin VB.Label Label2 
            Caption         =   "发票号码"
            Height          =   255
            Left            =   420
            TabIndex        =   11
            Top             =   855
            Width           =   1065
         End
         Begin VB.Label Label3 
            Caption         =   "出库类型"
            Height          =   255
            Left            =   420
            TabIndex        =   10
            Top             =   1275
            Width           =   1065
         End
         Begin VB.Label Label4 
            Caption         =   "工  程  号"
            Height          =   255
            Left            =   450
            TabIndex        =   9
            Top             =   1680
            Width           =   1065
         End
         Begin VB.Label Label5 
            Caption         =   "出库日期"
            Height          =   405
            Left            =   450
            TabIndex        =   8
            Top             =   2115
            Width           =   1065
         End
         Begin VB.Label Label6 
            Caption         =   "经  办  人"
            Height          =   255
            Left            =   450
            TabIndex        =   7
            Top             =   2535
            Width           =   1065
         End
         Begin VB.Label Label7 
            Caption         =   "保  管  人"
            Height          =   255
            Left            =   450
            TabIndex        =   6
            Top             =   2940
            Width           =   1065
         End
      End
      Begin VB.CommandButton cmdAddRecord 
         Caption         =   "添加记录"
         Height          =   405
         Left            =   -73590
         TabIndex        =   4
         Top             =   3450
         Width           =   1365
      End
      Begin VB.TextBox Text7 
         Height          =   285
         Left            =   -72120
         TabIndex        =   3
         Top             =   1350
         Width           =   945
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   2865
         Left            =   -74730
         TabIndex        =   2
         Top             =   390
         Width           =   5895
         _ExtentX        =   10398
         _ExtentY        =   5054
         _Version        =   393216
      End
      Begin VB.CommandButton cmdDelRecord 
         Caption         =   "删除记录"
         Height          =   405
         Left            =   -71100
         TabIndex        =   1
         Top             =   3450
         Width           =   1365
      End
   End
End
Attribute VB_Name = "OutUpdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Myws As Workspace
Dim Mydb As Database
Dim Myrs1 As Recordset
Dim Myrs2 As Recordset

Private Sub cmdAddRecord_Click()
    Project.StatusBar1.Panels(2).Text = "添加出库信息"
    OutInfoEdit.Show 1
End Sub

Private Sub cmdClose_Click()
    Myrs2.Close
    Myrs1.Close
    Mydb.Close
    Myws.Close
    Unload Me
    Project.StatusBar1.Panels(2).Text = "就绪"
End Sub

Private Sub cmdDel_Click()
    Dim a As Integer
    Dim mrc1 As Recordset
    Dim mrc2 As Recordset
    Dim SQLstring As String, str As String
    Dim Num As Integer
    Dim price As Single
    
    a = MsgBox("您确认要删除此项记录吗?", vbOKCancel + vbInformation, "信息提示")
    Set mrc1 = Mydb.OpenRecordset("select * from outlib where 出库单号码='" & Trim(Text1) & "'")
    Set mrc2 = Mydb.OpenRecordset("select * from outlibdetail where 出库单号码='" & Trim(Text1) & "'")
    If a = vbOK Then
        mrc1.Delete
        While mrc2.EOF = False
            str = mrc2.Fields("材料编码")
            Num = mrc2.Fields("数量")
            price = mrc2.Fields("金额")
            SQLstring = "update msurplus set 数量=数量+" + CStr(Num) + ",金额=金额+" + CStr(price) + " where 材料编码='" & str & "'"
            Mydb.Execute (SQLstring)
            mrc2.Delete
            mrc2.MoveNext
        Wend
        Unload Me
    End If
    mrc2.Close
    mrc1.Close
    OutUpdate.Show
End Sub

Private Sub cmdDelRecord_Click()
    Dim i As Integer, j As Integer
    
    Text7.Visible = False
    If MSFlexGrid1.Rows > 1 Then
        If MsgBox("确认要删除这条记录吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then
            i = MSFlexGrid1.Row
            Text7.Text = MSFlexGrid1.TextMatrix(i, 0)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 0) = Text7.Text
            Text7.Text = MSFlexGrid1.TextMatrix(i, 1)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 1) = Text7.Text
            Text7.Text = MSFlexGrid1.TextMatrix(i, 2)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 2) = Text7.Text
            Text7.Text = MSFlexGrid1.TextMatrix(i, 3)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 3) = Text7.Text
            Text7.Text = MSFlexGrid1.TextMatrix(i, 4)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 4) = Text7.Text
            Text7.Text = MSFlexGrid1.TextMatrix(i, 5)
            Text7.Text = ""
            MSFlexGrid1.TextMatrix(i, 5) = Text7.Text

⌨️ 快捷键说明

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