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

📄 frmoutquery.frm

📁 这个是基于vb的物资信息管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form OutQuery 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "查询出库信息"
   ClientHeight    =   7485
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9840
   Icon            =   "frmOutQuery.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7485
   ScaleWidth      =   9840
   StartUpPosition =   2  '屏幕中心
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   4455
      Left            =   150
      TabIndex        =   31
      Top             =   2880
      Width           =   8385
      _ExtentX        =   14790
      _ExtentY        =   7858
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   8760
      TabIndex        =   30
      Top             =   1080
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   8730
      TabIndex        =   29
      Top             =   300
      Width           =   945
   End
   Begin VB.Frame Frame1 
      Caption         =   "材料出库信息"
      Height          =   2595
      Left            =   150
      TabIndex        =   0
      Top             =   150
      Width           =   8355
      Begin VB.OptionButton Option7 
         Caption         =   "出库日期"
         Height          =   405
         Left            =   3360
         TabIndex        =   28
         Top             =   960
         Width           =   1065
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   7200
         TabIndex        =   27
         Top             =   450
         Width           =   945
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1440
         TabIndex        =   26
         Top             =   405
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1440
         TabIndex        =   25
         Top             =   952
         Width           =   1695
      End
      Begin VB.Frame Frame2 
         Caption         =   "出库时间"
         Height          =   1395
         Left            =   4530
         TabIndex        =   10
         Top             =   1020
         Width           =   3645
         Begin VB.ComboBox Combo1 
            Height          =   315
            Left            =   540
            TabIndex        =   16
            Top             =   315
            Width           =   945
         End
         Begin VB.ComboBox Combo2 
            Height          =   315
            Left            =   1800
            TabIndex        =   15
            Top             =   315
            Width           =   645
         End
         Begin VB.ComboBox Combo3 
            Height          =   315
            Left            =   2670
            TabIndex        =   14
            Top             =   300
            Width           =   645
         End
         Begin VB.ComboBox Combo4 
            Height          =   315
            Left            =   540
            TabIndex        =   13
            Top             =   840
            Width           =   945
         End
         Begin VB.ComboBox Combo5 
            Height          =   315
            Left            =   1800
            TabIndex        =   12
            Top             =   840
            Width           =   645
         End
         Begin VB.ComboBox Combo6 
            Height          =   315
            Left            =   2670
            TabIndex        =   11
            Top             =   840
            Width           =   645
         End
         Begin VB.Label Label1 
            Caption         =   "从:"
            Height          =   285
            Left            =   180
            TabIndex        =   24
            Top             =   330
            Width           =   375
         End
         Begin VB.Label Label2 
            Caption         =   "年"
            Height          =   285
            Left            =   1560
            TabIndex        =   23
            Top             =   330
            Width           =   255
         End
         Begin VB.Label Label3 
            Caption         =   "月"
            Height          =   285
            Left            =   2490
            TabIndex        =   22
            Top             =   330
            Width           =   255
         End
         Begin VB.Label Label4 
            Caption         =   "日"
            Height          =   285
            Left            =   3360
            TabIndex        =   21
            Top             =   330
            Width           =   255
         End
         Begin VB.Label Label5 
            Caption         =   "到:"
            Height          =   285
            Left            =   180
            TabIndex        =   20
            Top             =   840
            Width           =   375
         End
         Begin VB.Label Label6 
            Caption         =   "年"
            Height          =   285
            Left            =   1560
            TabIndex        =   19
            Top             =   870
            Width           =   255
         End
         Begin VB.Label Label7 
            Caption         =   "月"
            Height          =   285
            Left            =   2490
            TabIndex        =   18
            Top             =   870
            Width           =   255
         End
         Begin VB.Label Label8 
            Caption         =   "日"
            Height          =   285
            Left            =   3360
            TabIndex        =   17
            Top             =   900
            Width           =   255
         End
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1440
         TabIndex        =   9
         Top             =   1499
         Width           =   1695
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1440
         TabIndex        =   8
         Top             =   2046
         Width           =   1695
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   4560
         TabIndex        =   7
         Top             =   435
         Width           =   1245
      End
      Begin VB.OptionButton Option1 
         Caption         =   "出库单号码"
         Height          =   345
         Left            =   210
         TabIndex        =   6
         Top             =   420
         Width           =   1215
      End
      Begin VB.OptionButton Option2 
         Caption         =   "发票号码"
         Height          =   345
         Left            =   210
         TabIndex        =   5
         Top             =   967
         Width           =   1215
      End
      Begin VB.OptionButton Option3 
         Caption         =   "工程号"
         Height          =   345
         Left            =   210
         TabIndex        =   4
         Top             =   1514
         Width           =   1215
      End
      Begin VB.OptionButton Option4 
         Caption         =   "材料编码"
         Height          =   345
         Left            =   210
         TabIndex        =   3
         Top             =   2061
         Width           =   1215
      End
      Begin VB.OptionButton Option5 
         Caption         =   "材料名称"
         Height          =   345
         Left            =   3360
         TabIndex        =   2
         Top             =   420
         Width           =   1215
      End
      Begin VB.OptionButton Option6 
         Caption         =   "规格型号"
         Height          =   345
         Left            =   5970
         TabIndex        =   1
         Top             =   420
         Width           =   1215
      End
   End
End
Attribute VB_Name = "OutQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim Mydb As Database
Dim Myrs1 As Recordset
Dim Myrs2 As Recordset

Private Sub Command1_Click()
    Dim mrc As Recordset
    Dim str1 As String, str2 As String
    If Option1.Value = True Then
        If Text1.Text = "" Then
            MsgBox "请正确填写出库单号码!", vbOKOnly + vbExclamation, "信息提示"
            Text1.SetFocus
            Exit Sub
        Else
            Set Myrs1 = Mydb.OpenRecordset("select * from outlib where 出库单号码='" & Trim(Text1) & "'")
            MSFlexGrid1.Clear
            TableInit
            If Myrs1.RecordCount >= 1 Then
                Set Myrs2 = Mydb.OpenRecordset("select * from outlibdetail,goods where 出库单号码='" & Trim(Text1) & "' And GoodsID = 材料编码")
                While Myrs2.EOF = False
                    MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
                    MSFlexGrid1.Row = MSFlexGrid1.Rows - 1
                    MSFlexGrid1.Col = 0
                    MSFlexGrid1.Text = Myrs1.Fields("出库单号码")
                    MSFlexGrid1.Col = 1
                    MSFlexGrid1.Text = Myrs1.Fields("发票号码")
                    MSFlexGrid1.Col = 2
                    MSFlexGrid1.Text = Myrs1.Fields("出库类型")
                    MSFlexGrid1.Col = 3
                    If IsNull(Myrs1.Fields("工程号")) Then
                        MSFlexGrid1.Text = ""
                    Else
                        MSFlexGrid1.Text = Myrs1.Fields("工程号")
                    End If
                    MSFlexGrid1.Col = 4
                    MSFlexGrid1.Text = Myrs1.Fields("出库日期")
                    MSFlexGrid1.Col = 5
                    If IsNull(Myrs1.Fields("经办人")) Then
                        MSFlexGrid1.Text = ""
                    Else
                        MSFlexGrid1.Text = Myrs1.Fields("经办人")
                    End If
                    MSFlexGrid1.Col = 6
                    If IsNull(Myrs1.Fields("保管人")) Then
                        MSFlexGrid1.Text = ""
                    Else
                        MSFlexGrid1.Text = Myrs1.Fields("保管人")
                    End If
                    MSFlexGrid1.Col = 7
                    MSFlexGrid1.Text = Myrs2.Fields("goodsid")
                    MSFlexGrid1.Col = 8
                    MSFlexGrid1.Text = Myrs2.Fields("goodsname")
                    MSFlexGrid1.Col = 9
                    MSFlexGrid1.Text = Myrs2.Fields("type")
                    MSFlexGrid1.Col = 10
                    MSFlexGrid1.Text = Myrs2.Fields("unit")
                    MSFlexGrid1.Col = 11
                    MSFlexGrid1.Text = Myrs2.Fields("数量")
                    MSFlexGrid1.Col = 12
                    MSFlexGrid1.Text = Format(Myrs2.Fields("单价"), "#0.00")
                    MSFlexGrid1.Col = 13
                    MSFlexGrid1.Text = Format(Myrs2.Fields("金额"), "#0.00")
                    MSFlexGrid1.Col = 14
                    If IsNull(Myrs2.Fields("备注")) Then
                        MSFlexGrid1.Text = ""
                    Else
                        MSFlexGrid1.Text = Myrs2.Fields("备注")
                    End If
                    Myrs2.MoveNext
                Wend
                Myrs2.Close
            Else
                MsgBox "不存在这个出库单号码", vbOKOnly + vbExclamation, "信息提示"
                Text1 = ""
                Text1.SetFocus
                Exit Sub
            End If
            Myrs1.Close
        End If
    End If
    If Option2.Value = True Then
        If Text2.Text = "" Then
            MsgBox "请正确填写发票号码!", vbOKOnly + vbExclamation, "信息提示"
            Text2.SetFocus
            Exit Sub
        Else
            Set Myrs1 = Mydb.OpenRecordset("select * from outlib where 发票号码='" & Trim(Text2) & "'")
            MSFlexGrid1.Clear
            TableInit
            If Myrs1.RecordCount >= 1 Then
                Set Myrs2 = Mydb.OpenRecordset("select * from outlibdetail where 出库单号码='" & Myrs1.Fields("出库单号码") & "'")
                Set mrc = Mydb.OpenRecordset("select * from goods where goodsid='" & Myrs2.Fields("材料编码") & "'")
                While Myrs2.EOF = False
                    MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
                    MSFlexGrid1.Row = MSFlexGrid1.Rows - 1
                    MSFlexGrid1.Col = 0
                    MSFlexGrid1.Text = Myrs1.Fields("出库单号码")
                    MSFlexGrid1.Col = 1
                    MSFlexGrid1.Text = Myrs1.Fields("发票号码")

⌨️ 快捷键说明

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