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

📄 form14.frm

📁 我用VB开发的饲料经营进销存管理程序,包含购入、售出管理
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Begin VB.Form Form14 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form14"
   ClientHeight    =   9375
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   12870
   LinkTopic       =   "Form14"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   9375
   ScaleWidth      =   12870
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "打印合计欠款数据"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   9000
      TabIndex        =   11
      Top             =   7920
      Width           =   2415
   End
   Begin VB.CommandButton Command3 
      Caption         =   "删除帐本号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1080
      TabIndex        =   10
      Top             =   8400
      Width           =   1775
   End
   Begin VB.ListBox List3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1020
      Left            =   3000
      TabIndex        =   9
      Top             =   7920
      Width           =   1575
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   1080
      TabIndex        =   7
      Text            =   "全  部"
      Top             =   7920
      Width           =   1775
   End
   Begin VB.CommandButton Command2 
      Caption         =   "打印明细欠款数据"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   6600
      TabIndex        =   6
      Top             =   7920
      Width           =   2415
   End
   Begin VB.ListBox List2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   6780
      Left            =   8520
      TabIndex        =   4
      Top             =   960
      Width           =   4095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "删除数据"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4800
      TabIndex        =   3
      Top             =   7920
      Width           =   1695
   End
   Begin VB.ListBox List1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   6780
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   8175
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "帐本号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   120
      TabIndex        =   8
      Top             =   7920
      Width           =   960
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   " 还款日期       还款金额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   8520
      TabIndex        =   5
      Top             =   720
      Width           =   2880
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   " 制单日期        帐本号      帐单号   期初欠款金额  期内还款金额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   120
      TabIndex        =   2
      Top             =   720
      Width           =   7680
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "欠款查询画面"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   3600
      TabIndex        =   0
      Top             =   240
      Width           =   1890
   End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim f_current_row
Dim f_reckon_table(1000, 10), f_repay_table(1000, 7), f_all

Private Sub Combo1_Click()
    If Combo1.Text = "全  部" Then
        f_all = True
        List3.Clear
        For i = 0 To Combo1.ListCount - 1
            j = 0
            If Combo1.List(i) <> "全  部" Then
                List3.AddItem Combo1.List(i), j
                j = j + 1
            End If
        Next
    Else
        If f_all = True Then
            List3.Clear
            f_all = False
        End If
        For i = 0 To List3.ListCount - 1
            If List3.List(i) = Combo1.Text Then
                GoSub exit_combo1_click
            End If
        Next
        List3.AddItem Combo1.Text, List3.ListCount
    End If
    List3.ListIndex = 0
exit_combo1_click:
End Sub

Private Sub Command1_Click()
    t_YesNo = MsgBox("是否确认删除", vbYesNo)
    If t_YesNo = 7 Then
        GoSub exit_Command1_Click
    End If
    If List2.ListCount = 0 Then
        MsgBox ("没有对应数据")
        GoSub exit_Command1_Click
    End If
    Dim cnn1 As ADODB.Connection
    Dim cmd1 As ADODB.Command
    Dim rs1 As ADODB.Recordset
    Set cnn1 = New ADODB.Connection
    cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:\Documents and Settings\jujumao\My Documents\粤丰饲料\粤丰饲料经营情况.mdb;"
    Set cmd1 = New ADODB.Command
    SQL = "update 帐单表 set 还款金额=" & (f_reckon_table(f_current_row, 8) - f_repay_table(List2.ListIndex, 6)) & " where 帐单号 = " & _
    "'" & f_reckon_table(f_current_row, 5) & "'" & " and 帐本号= " & "'" & f_reckon_table(f_current_row, 4) & "'"
    With cmd1
        .ActiveConnection = cnn1
        .CommandText = SQL
        .CommandType = adCmdText
        .Execute
    End With
    SQL = "delete from 欠款收回表 where 编号 =" & f_repay_table(List2.ListIndex, 0)
    With cmd1
        .ActiveConnection = cnn1
        .CommandText = SQL
        .CommandType = adCmdText
        .Execute
    End With
    SQL = "select * from 欠款收回表 where 帐单号 = " & _
    "'" & f_reckon_table(f_current_row, 5) & "'" & " and 帐本号= " & "'" & f_reckon_table(f_current_row, 4) & "'"
    With cmd1
        .ActiveConnection = cnn1
        .CommandText = SQL
        .CommandType = adCmdText
    End With
    Set rs1 = cmd1.Execute
    List2.Clear
    If rs1.EOF Then
        cnn1.Close
        Set cnn1 = Nothing
        GoTo exit_Command1_Click
    End If
    j = 0
    rs1.MoveFirst
    While Not rs1.EOF
        S = ""
        For i = 0 To rs1.Fields.Count - 1
            Select Case i
                Case 3
                    date_string = Round(rs1.Fields(3).Value, 0) & "年" & _
                    Round(rs1.Fields(4).Value, 0) & "月" & _
                    Round(rs1.Fields(5).Value, 0) & "日"
                    t_len = 12 - Len(date_string)
                    S1 = ""
                    For t = 1 To t_len
                        S1 = S1 & " "
                    Next
                    S = S & date_string & S1
                Case 6
                    t_len = 0
                    t_value = Round(rs1.Fields(i).Value, 2)
                    t_len = 11 - Len(t_value)
                    S1 = ""
                    If t_value = Int(t_value) Then
                        S1 = S1 & ".00"
                        t_len = t_len - 3
                    Else
                        If (t_value * 10) = Int(t_value * 10) Then
                            S1 = S1 & "0"
                            t_len = t_len - 1
                        End If
                    End If
                    For t = 1 To t_len
                        S1 = S1 & " "
                    Next
                    S = S & t_value & S1

⌨️ 快捷键说明

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