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

📄 frmspzl.frm

📁 一个小型的进销存管理软件,数据采用ACCE
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   300
            Left            =   2040
            TabIndex        =   9
            Top             =   1200
            Width           =   2055
         End
         Begin VB.TextBox TxtLBBM 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000003&
            DataField       =   "SPLB_ID"
            DataSource      =   "Adodc2"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   300
            Left            =   2040
            Locked          =   -1  'True
            TabIndex        =   8
            Top             =   600
            Width           =   2055
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "类别名称:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   480
            TabIndex        =   7
            Top             =   1200
            Width           =   1500
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "类别编码:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   480
            TabIndex        =   6
            Top             =   600
            Width           =   1500
         End
      End
      Begin MSComctlLib.ImageList ImageList2 
         Left            =   720
         Top             =   2160
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   1
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":0057
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   3360
         Top             =   1560
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   7
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":01B1
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":04CB
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":091D
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":176F
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":1D09
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":1E63
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmSPZL.frx":1FBD
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSFlexGridLib.MSFlexGrid Grid 
         Height          =   5295
         Left            =   120
         TabIndex        =   31
         Top             =   240
         Width           =   8535
         _ExtentX        =   15055
         _ExtentY        =   9340
         _Version        =   393216
         Cols            =   7
         FixedCols       =   0
         RowHeightMin    =   315
         SelectionMode   =   1
         FormatString    =   "商品编码|^ 类 别 码 |^      商  品  名  称 |^      货   号  |^ 规 格 |^ 单  位 |^   产         地 "
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "商品分类"
      Height          =   5655
      Left            =   120
      TabIndex        =   2
      Top             =   480
      Width           =   2535
      Begin MSComctlLib.TreeView TVLB 
         Height          =   5295
         Left            =   120
         TabIndex        =   4
         Top             =   240
         Width           =   2295
         _ExtentX        =   4048
         _ExtentY        =   9340
         _Version        =   393217
         Style           =   5
         ImageList       =   "ImageList2"
         BorderStyle     =   1
         Appearance      =   1
      End
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   6120
      Width           =   11595
      _ExtentX        =   20452
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   360
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   11595
      _ExtentX        =   20452
      _ExtentY        =   635
      ButtonWidth     =   1349
      ButtonHeight    =   582
      Style           =   1
      TextAlignment   =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   9
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "增加"
            Key             =   "AddNode"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "DelNode"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "增加"
            Key             =   "AddSP"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "DelSP"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "修改"
            Key             =   "ModifySP"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            ImageIndex      =   7
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "Exit"
            ImageIndex      =   1
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
End
Attribute VB_Name = "FrmSPZL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim index As Integer
Dim TreeRs As ADODB.Recordset
Dim Rst As Recordset
Dim Flag As Boolean
Dim SPLBBM As Integer
Dim CheckRs As ADODB.Recordset
Dim BindRs As ADODB.Recordset
Dim DelRs As ADODB.Recordset
Dim SPID As Integer
Dim ModifyFlag As Integer
Dim SQLTJ As String

Private Sub Combo1_Click()
    Dim LBMC As String
    Dim LBBMRs As ADODB.Recordset
    
    LBMC = Combo1.Text
    Set LBBMRs = New ADODB.Recordset
        LBBMRs.Open "select * from sp_lb where splbmc='" & LBMC & "'", db, 1, 3
        
        SPLBBM = LBBMRs.Fields(0).Value
        
    LBBMRs.Close
    Set LBBMRs = Nothing
        
End Sub

Private Sub Combo3_Click()
    TxtGG = Combo3.Text
End Sub

Private Sub Command1_Click()

    On Error GoTo HandleErrors:
    
    If TxtLBMC = "" Then
        MsgBox "请输入类别名称!", vbOKOnly + 48, "警告"
        Exit Sub
    Else
        Call Check_LBMC
        If Flag = True Then
            Exit Sub
        End If
    End If
    
    Rst.Fields(0) = TxtLBBM
    Rst.Fields(1) = TxtLBMC
    
    Rst.Update
      
    Frame1.Enabled = True
    Frame2.Caption = "商品列表"
    Toolbar1.Enabled = True
    Grid.Visible = True
    Frame3.Visible = False
       
    
    Call TVLB_Bind '刷新商品类别表
           
    Exit Sub
HandleErrors:
    MsgBox Err.Description, vbOKOnly + vbCritical
End Sub

Private Sub Command2_Click()
    On Error GoTo HandleErrors:
    
    Rst.CancelUpdate
    Frame1.Enabled = True
    Frame2.Caption = "商品列表"
    Toolbar1.Enabled = True
    Grid.Visible = True
    Frame3.Visible = False
    
    
    Exit Sub
HandleErrors:
    MsgBox Err.Description, vbOKOnly + vbCritical
End Sub

Private Sub Command3_Click()
    On Error GoTo HandleErrors:
    
    TxtDW.Text = Combo2.Text
    TxtGG.Text = Combo3.Text
    
    If TxtSPMC = "" Then
        MsgBox "请输入商品名称!", vbOKOnly + 48, "警告"
        TxtSPMC.SetFocus
        Exit Sub
    ElseIf Combo1.Text = "" Then
        MsgBox "请商品类别!", vbOKOnly + 48, "警告"
        Combo1.SetFocus
        Exit Sub
    ElseIf TxtHH = "" Then
        MsgBox "请输入货号!", vbOKOnly + 48, "警告"
        TxtHH.SetFocus
        Exit Sub
    ElseIf Combo3.Text = "" Then
        MsgBox "请选择商品规格!", vbOKOnly + 48, "警告"
        Combo3.SetFocus
        Exit Sub
    ElseIf TxtDW = "" Then
        MsgBox "请选择商品单位!", vbOKOnly + 48, "警告"
        Combo2.SetFocus
        Exit Sub
    End If
    
    Rst.Fields(0) = TxtSPBM
    Rst.Fields(1) = SPLBBM
    Rst.Fields(2) = TxtSPMC
    Rst.Fields(3) = TxtHH
    Rst.Fields(4) = TxtGG
    Rst.Fields(5) = TxtDW
    Rst.Fields(6) = TxtCD
           
    Rst.Update
        
    Frame1.Enabled = True
    Frame2.Caption = "商品列表"
    Toolbar1.Enabled = True
    Grid.Visible = True
    Frame4.Visible = False
    
    Call ReSet
    Call FillGrid '刷新商品列表
    
    Exit Sub
HandleErrors:
    MsgBox Err.Description, vbOKOnly + vbCritical
End Sub

Private Sub Command4_Click()
    On Error GoTo HandleErrors:
    
    Rst.CancelUpdate
    Frame1.Enabled = True
    Frame2.Caption = "商品列表"
    Toolbar1.Enabled = True
    Grid.Visible = True
    Frame4.Visible = False
    
    Exit Sub
HandleErrors:
    MsgBox Err.Description, vbOKOnly + vbCritical
End Sub

Private Sub Form_Load()
    Frame3.Visible = False
    Frame4.Visible = False
       
    Call ReSet
    
    Call TVLB_Bind
      
    Call FillGrid
        
End Sub
Sub ReSet()

⌨️ 快捷键说明

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