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

📄 frmprint.frm

📁 此为我2001年为东莞建发楦头开发的企业管理软件他们使用至今,望斑竹指教! 其他会员最好不要随意下载,需经斑竹同意或我本人同意,谢谢!
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Index           =   5
         Left            =   240
         TabIndex        =   17
         Top             =   1920
         Width           =   1335
      End
      Begin VB.Label lbl1 
         Caption         =   "型体类型一:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   3
         Left            =   3120
         TabIndex        =   16
         Top             =   1440
         Width           =   1335
      End
      Begin VB.Label lbl1 
         Caption         =   "客户范围:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   15
         Top             =   1440
         Width           =   1335
      End
      Begin VB.Label lblfang 
         Caption         =   "客户方向:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Left            =   3120
         TabIndex        =   14
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label fangxiang 
         Caption         =   "客户方向:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000C0&
         Height          =   255
         Left            =   3120
         TabIndex        =   12
         Top             =   240
         Width           =   1095
      End
      Begin VB.Label lbl1 
         Caption         =   "关键内容:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   4
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   1095
      End
      Begin VB.Label lbl1 
         Caption         =   "选取类型:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   8
         Top             =   1035
         Width           =   1095
      End
      Begin VB.Label lbl1 
         Caption         =   "订货日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   2
         Top             =   2325
         Width           =   1215
      End
      Begin VB.Label lbl 
         Caption         =   "到:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   0
         Left            =   3120
         TabIndex        =   1
         Top             =   2400
         Width           =   375
      End
   End
End
Attribute VB_Name = "frmprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
  Dim clitb As Recordset
  Dim rs As Recordset
  Dim sql As String

Private Sub cmbfang_Click()
    If cmbfang <> "全部" Then
        Set clitb = New Recordset
        
        cmbTown.Clear
        cmbTown.AddItem "全部"
        clitb.Open "select distinct town from client where fangxiang='" & cmbfang.Text & "'", db, adOpenStatic, adLockOptimistic
        For i = 1 To clitb.RecordCount
            If Not IsNull(clitb!town) Then cmbTown.AddItem clitb!town
            clitb.MoveNext
        Next
        cmbTown.ListIndex = 0
        clitb.Close
        
        Set clitb = Nothing
    End If

End Sub

Private Sub cmdcancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
    Me.MousePointer = 11
   sql = ""
   
   TxtSearch.Text = Trim(TxtSearch.Text)
    
   If Len(Trim(TxtSearch.Text)) <> 0 Then
        sql = " and (model  like '%" & TxtSearch.Text & "%'" & " or clino  like '%" & TxtSearch.Text & "%'" & _
              " or s_name  like '%" & TxtSearch.Text & "%')"
   End If
   
   If Cmbtype.Text <> "全部" Then
        sql = sql & " and type=" & "'" & Cmbtype.Text & "'"
   End If
'type1
   If cmbType1.Text <> "全部" Then
        sql = sql & " and type1=" & "'" & Trim(cmbType1.Text) & "'"
   End If
'type2
   If cmbType2.Text <> "全部" Then
        sql = sql & " and type2=" & "'" & Trim(cmbType2.Text) & "'"
   End If
'type3
   If cmbType3.Text <> "全部" Then
        sql = sql & " and type3=" & "'" & Trim(cmbType3.Text) & "'"
   End If
'customer
   If Len(Trim(Txtclient.Text)) <> 0 Then
          sql = sql & " and clino=" & "'" & Trim(Txtclient.Text) & "'"
   End If
   
   Select Case PCheck
   Case "sp1"
      Select Case PreportType
        Case "样品生产单明细表"
          If cmbfang.Text = "全部" Then
            sqlcc2 = "SELECT * from sp1_view where din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & " order by s_name,din_date"
          Else
            sqlcc2 = "SELECT * from sp1_view where din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & " and fang='" & cmbfang.Text & "'" & " order by s_name,din_date"
          End If
          'ARsp1print.Show 1'2002-08-24
'            Dim rs As Recordset


            Set rs = New Recordset
            rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
            If rs.RecordCount > 0 Then
                 rs.Close
                 Set rs = Nothing
                 ARsp1print.Show 1
            Else
                 rs.Close
                 Set rs = Nothing
                 MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                 Me.MousePointer = 0
                 Exit Sub
            End If
          
        Case "样品生产单汇总表"
           If ChkType.value = 1 Then
             If cmbfang.Text = "全部" Then
               sqlcc2 = "SELECT fangxiang,s_name,sum(total_qty) as total from sp1total_view where sono=null or (din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & ") group by s_name,fangxiang  order by fangxiang,sum(total_qty) desc"
             Else
               sqlcc2 = "SELECT fangxiang,s_name,sum(total_qty) as total from sp1total_view where sono=null or (din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & ") group by s_name,fangxiang having xiangfang='" & cmbfang.Text & "'" & " order by fangxiang,sum(total_qty) desc"
             End If
              ARsp12print.Caption = "样品生产单汇总报表"
              ARsp12print.lbltitle = "建发鞋楦厂---样品生产单汇总报表"
'              ARsp12print.Show 1'2002-08-24
                Set rs = New Recordset
                rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                If rs.RecordCount > 0 Then
                     rs.Close
                     Set rs = Nothing
                     ARsp12print.Show 1
                Else
                     rs.Close
                     Set rs = Nothing
                     MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                     Me.MousePointer = 0
                     Exit Sub
                End If

           Else
             If cmbfang.Text = "全部" Then
                 sqlcc2 = "SELECT s_name,sum(total_qty) as total from sp1total_view where sono=null or (din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & ") group by s_name  order by sum(total_qty) desc"
             Else
                 sqlcc2 = "SELECT s_name,sum(total_qty) as total from sp1total_view where fang='" & cmbfang.Text & "'" & " and (sono=null or (din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & ")) group by s_name  order by sum(total_qty) desc"
             
             End If
              ARsp11print.Caption = "样品生产单汇总报表"
              ARsp11print.lbltitle = "建发鞋楦厂---样品生产单汇总报表"
'              ARsp11print.Show 1'2002-08-24
                Set rs = New Recordset
                rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                If rs.RecordCount > 0 Then
                     rs.Close
                     Set rs = Nothing
                     ARsp11print.Show 1
                Else
                     rs.Close
                     Set rs = Nothing
                     MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                     Me.MousePointer = 0
                     Exit Sub
                End If

          End If
       End Select
    Case "sp2"
       Select Case PreportType
        Case "大货生产单明细表"
            If cmbfang.Text = "全部" Then
               sqlcc2 = "SELECT * from sp2_view where din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & " order by s_name,din_date"
            Else
               sqlcc2 = "SELECT * from sp2_view where din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & sql & " and fang='" & cmbfang.Text & "'" & " order by s_name,din_date"
            End If
            'ARsp2print.Show 1'2002-08-24
                Set rs = New Recordset
                rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                If rs.RecordCount > 0 Then
                     rs.Close
                     Set rs = Nothing

⌨️ 快捷键说明

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