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

📄 frmprintmust.frm

📁 vb超市销售管理系统源码
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FrmPrintMust 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Form1"
   ClientHeight    =   6000
   ClientLeft      =   4410
   ClientTop       =   1470
   ClientWidth     =   7425
   Icon            =   "FrmPrintMust.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6000
   ScaleWidth      =   7425
   ShowInTaskbar   =   0   'False
   Begin MSAdodcLib.Adodc printmust 
      Height          =   375
      Left            =   3840
      Top             =   6480
      Width           =   2535
      _ExtentX        =   4471
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "打印数据"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame3 
      Height          =   5055
      Left            =   120
      TabIndex        =   7
      Top             =   840
      Width           =   7215
      Begin MSFlexGridLib.MSFlexGrid list1 
         Height          =   4695
         Left            =   120
         TabIndex        =   8
         TabStop         =   0   'False
         Top             =   240
         Width           =   6975
         _ExtentX        =   12303
         _ExtentY        =   8281
         _Version        =   393216
         Cols            =   7
         FixedCols       =   0
         BackColor       =   12320251
      End
   End
   Begin VB.Frame Frame2 
      Height          =   855
      Left            =   3000
      TabIndex        =   6
      Top             =   0
      Width           =   4335
      Begin VB.CommandButton Command3 
         Caption         =   "打印(&P)"
         Height          =   495
         Left            =   1680
         TabIndex        =   2
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查找(&F)"
         Height          =   495
         Left            =   360
         TabIndex        =   1
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "返回(&R)"
         Height          =   495
         Left            =   3000
         TabIndex        =   3
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "打印条件"
      Height          =   855
      Left            =   120
      TabIndex        =   4
      Top             =   0
      Width           =   2775
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   1320
         TabIndex        =   0
         Top             =   270
         Width           =   1215
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "库存数量小于"
         Height          =   180
         Left            =   120
         TabIndex        =   5
         Top             =   360
         Width           =   1080
      End
   End
   Begin MSAdodcLib.Adodc stock 
      Height          =   375
      Left            =   480
      Top             =   6360
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "库存表"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "FrmPrintMust"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Dim list1SQL As String
  If IsNumeric(Text1.Text) = False Then
     MsgBox ("输入的数值有误请重输!")
     Text1.SelStart = 0
     Text1.SelLength = Len(Text1.Text)
     Text1.SetFocus
     Exit Sub
     Else
     list1SQL = "select * from stock where 数量 < " + Trim(Text1.Text)
     Call list1disp(list1SQL)
  End If
 End Sub

Private Sub Command2_Click()
   Unload Me
End Sub

Private Sub Command3_Click() ' 打印
With DataEnvironment1
 If .rsprintmust.State = adStateOpen Then
   .rsprintmust.Close
 End If
 If Trim(Text1.Text) = "" Then
  Text1.Text = 10000
  End If
 .printmust Val(Text1.Text) '对问号赋值
 If .rsprintmust.RecordCount > 0 Then
   MustReport.Show
  Else
   MsgBox ("没有找到记录!")
  Exit Sub
  End If
 End With
End Sub

Private Sub Form_Load()
  Me.Top = (Mainform.Height - Me.Height) / 2 - 800
  Me.Left = (Mainform.Width - Me.Width) / 2
  Me.Caption = "仓库管理系统→" & "需采购物品打印"
  stock.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
  printmust.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
  Text1.BackColor = &HFFC0C0
  Call list1disp("stock")
  kccount = 0
End Sub

Private Sub Text1_GotFocus()
Text1.BackColor = &HC0FFFF
End Sub

Private Sub Text1_LostFocus()
Text1.BackColor = &HFFC0C0
End Sub

Private Sub list1def()
  list1.TextMatrix(0, 0) = "品名"
  list1.TextMatrix(0, 1) = "规格"
  list1.TextMatrix(0, 2) = "导电"
  list1.TextMatrix(0, 3) = "硬度"
  list1.TextMatrix(0, 4) = "数量"
  list1.TextMatrix(0, 5) = "单位"
End Sub

Private Sub list1disp(StrSQL As String)
  Dim roww As Integer           ''行
  roww = 1
  list1.Clear
  list1.rows = 1
  Call list1def
  stock.RecordSource = StrSQL
  stock.Refresh
  If stock.Recordset.EOF = False Then
   stock.Recordset.MoveFirst
  End If
   Do While stock.Recordset.EOF = False
    For i = 0 To 5     '给空值赋值
      If IsNull(stock.Recordset.Fields(i)) = True Then
         stock.Recordset.Fields(i) = ""
       End If
    Next i
    list1.rows = list1.rows + 1
    list1.TextMatrix(roww, 0) = stock.Recordset.Fields(0)
    list1.TextMatrix(roww, 1) = stock.Recordset.Fields(1)
    list1.TextMatrix(roww, 2) = stock.Recordset.Fields(2)
    list1.TextMatrix(roww, 3) = stock.Recordset.Fields(3)
    list1.TextMatrix(roww, 4) = stock.Recordset.Fields(4)
    list1.TextMatrix(roww, 5) = stock.Recordset.Fields(5)
    roww = roww + 1
    stock.Recordset.MoveNext
  Loop
End Sub

⌨️ 快捷键说明

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