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

📄 menu31.frm

📁 大学毕业的课题,可能比较简单一点,入门的人可以
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form winmenu31 
   ClientHeight    =   6540
   ClientLeft      =   1920
   ClientTop       =   705
   ClientWidth     =   14115
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MDIChild        =   -1  'True
   ScaleHeight     =   6540
   ScaleWidth      =   14115
   Begin VB.TextBox Text4 
      Appearance      =   0  'Flat
      BackColor       =   &H000000FF&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   24
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   0
      TabIndex        =   22
      Text            =   "正在进行EXCEL报表的输出工作,请稍候......"
      Top             =   2880
      Visible         =   0   'False
      Width           =   9735
   End
   Begin VB.Frame Frame2 
      Caption         =   "请输入要查询统计的日期区间"
      Height          =   1695
      Left            =   0
      TabIndex        =   4
      Top             =   0
      Width           =   9855
      Begin VB.CommandButton Command5 
         Caption         =   "打  印"
         Height          =   375
         Left            =   8280
         TabIndex        =   11
         Top             =   515
         Width           =   1335
      End
      Begin VB.CommandButton Command4 
         Caption         =   "统  计"
         Height          =   375
         Left            =   8280
         TabIndex        =   20
         Top             =   140
         Width           =   1335
      End
      Begin VB.CommandButton Command12 
         Caption         =   "输出EXCEL"
         Height          =   375
         Left            =   8280
         TabIndex        =   21
         Top             =   1265
         Width           =   1335
      End
      Begin VB.CommandButton Command7 
         Caption         =   "退  出"
         Height          =   375
         Left            =   8280
         TabIndex        =   12
         Top             =   890
         Width           =   1335
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Left            =   5640
         TabIndex        =   19
         Top             =   1110
         Width           =   2175
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   5640
         TabIndex        =   18
         Top             =   750
         Width           =   2175
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   5640
         TabIndex        =   17
         Top             =   390
         Width           =   2175
      End
      Begin VB.CommandButton Command11 
         Caption         =   "按车号统计"
         Height          =   375
         Left            =   3840
         TabIndex        =   16
         Top             =   1080
         Width           =   1575
      End
      Begin VB.CommandButton Command10 
         Caption         =   "物资名称统计"
         Height          =   375
         Left            =   3840
         TabIndex        =   15
         Top             =   720
         Width           =   1575
      End
      Begin VB.CommandButton Command9 
         Caption         =   "拉运单位统计"
         Height          =   375
         Left            =   3840
         TabIndex        =   14
         Top             =   360
         Width           =   1575
      End
      Begin VB.CommandButton Command8 
         Caption         =   "年报表"
         Height          =   375
         Left            =   2280
         TabIndex        =   13
         Top             =   1200
         Width           =   975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "月报表"
         Height          =   375
         Left            =   1320
         TabIndex        =   5
         Top             =   1200
         Width           =   975
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1200
         TabIndex        =   8
         Top             =   360
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1200
         TabIndex        =   7
         Top             =   840
         Width           =   1695
      End
      Begin VB.CommandButton Command6 
         Caption         =   "日报表"
         Height          =   375
         Left            =   360
         TabIndex        =   6
         Top             =   1200
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "起始日期:"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "截止日期:"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   840
         Width           =   975
      End
      Begin VB.Image Image4 
         Height          =   480
         Left            =   3000
         Picture         =   "menu31.frx":0000
         Top             =   720
         Width           =   480
      End
      Begin VB.Image Image3 
         Height          =   480
         Left            =   3000
         Picture         =   "menu31.frx":030A
         Top             =   240
         Width           =   480
      End
   End
   Begin MSComCtl2.MonthView selectdate 
      Height          =   2220
      Left            =   1680
      TabIndex        =   3
      Top             =   3720
      Visible         =   0   'False
      Width           =   4065
      _ExtentX        =   7170
      _ExtentY        =   3916
      _Version        =   393216
      ForeColor       =   -2147483630
      BackColor       =   -2147483633
      Appearance      =   1
      StartOfWeek     =   25559041
      CurrentDate     =   36718
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   2520
      TabIndex        =   2
      Top             =   7920
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "更改查询条件"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   7920
      Width           =   2055
   End
   Begin MSFlexGridLib.MSFlexGrid bg 
      Height          =   3735
      Left            =   -120
      TabIndex        =   0
      Top             =   2160
      Width           =   12060
      _ExtentX        =   21273
      _ExtentY        =   6588
      _Version        =   393216
      Cols            =   12
      RowHeightMin    =   300
      ForeColor       =   12615680
      ForeColorFixed  =   8421376
      BackColorBkg    =   16777215
      GridColor       =   16777215
      TextStyleFixed  =   4
      GridLines       =   3
      GridLinesFixed  =   3
      SelectionMode   =   1
      MergeCells      =   2
      AllowUserResizing=   1
      FormatString    =   "流水号 |拉运单位         |拉运人  |物资名称  |车型  |车号    |毛重(t) |皮重(t) |扣杂率(%) |净重(t)  |日期       |司磅员    "
   End
   Begin MSComDlg.CommonDialog cmdlog 
      Left            =   0
      Top             =   1680
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
End
Attribute VB_Name = "winmenu31"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bdkk As Database
Dim bdktab As Recordset
Dim data1 As Database
Dim jcktab As Recordset
Dim tjbb As Recordset
Dim whattodo As String
Dim hztab As Recordset
Dim pztab As Recordset
Dim ttab3 As Recordset
Dim ttab2 As Recordset
Dim whotj As String
 Function prnt1(X As Integer, Y As Integer, font As Single, txt As String)
     Printer.CurrentX = X
     Printer.CurrentY = Y
     Printer.FontBold = False
     Printer.FontSize = font
     Printer.Print txt
 End Function
 Private Sub bgclear()
   Do While bg.Rows - 1 > 1
     bg.RemoveItem (1)
  Loop
 bg.Row = 1
 bg.Col = 0: bg.Text = ""
 bg.Col = 1: bg.Text = ""
 bg.Col = 2: bg.Text = ""
 bg.Col = 3: bg.Text = ""
 bg.Col = 4: bg.Text = ""
 bg.Col = 5: bg.Text = ""
 bg.Col = 6: bg.Text = ""
 bg.Col = 7: bg.Text = ""
 bg.Col = 8: bg.Text = ""
  bg.Col = 9: bg.Text = ""
   bg.Col = 10: bg.Text = ""
 End Sub
Private Sub refreshdata()
Do Until ttab2.EOF
   If ttab2("zj") = Empty Or ttab2("zj") = Null Or ttab2("zj") = " " Then
   Else
   w1 = LTrim(ttab2("wzname"))
   w2 = LTrim(ttab2("zj"))
   w3 = LTrim(ttab2("hzdw"))
   w4 = LTrim(ttab2("hzname")) + " "
   w5 = LTrim(ttab2("ch"))
   w6 = LTrim(ttab2("mz"))
   w7 = LTrim(ttab2("pz"))
   w8 = LTrim(ttab2("rq"))
   w9 = LTrim(ttab2("sby"))
   w10 = LTrim(ttab2("cx"))
   w11 = LTrim(ttab2("lsh"))
   w12 = LTrim(ttab2("bz"))
   w13 = LTrim(ttab2("modi"))
   w14 = LTrim(ttab2("ttime"))
   If w1 & "" = "" Then w1 = w1 & " "
   If w2 & "" = "" Then w2 = w1 & " "
   If w3 & "" = "" Then w3 = w1 & " "
   If w4 & "" = "" Then w4 = w1 & " "
   If w5 & "" = "" Then w5 = w1 & " "
   If w6 & "" = "" Then w6 = w1 & " "
   If w7 & "" = "" Then w7 = w1 & " "
   If w8 & "" = "" Then w8 = w1 & " "
   If w9 & "" = "" Then w9 = w1 & " "
   If w10 & "" = "" Then w10 = w1 & " "
   If w11 & "" = "" Then w11 = w1 & " "
   If w12 & "" = "" Then w12 = w1 & " "
   If w13 & "" = "" Then w13 = w1 & " "
   If w14 & "" = "" Then w14 = w1 & " "
   ttab3.AddNew
   ttab3("wzname") = w1
   ttab3("zj") = w2
   ttab3("hzdw") = w3
   ttab3("hzname") = w4
   ttab3("ch") = w5
   ttab3("mz") = w6
   ttab3("pz") = w7
   ttab3("rq") = w8
   ttab3("sby") = w9
   ttab3("cx") = w10
   ttab3("lsh") = w11
   ttab3("bz") = w12
   ttab3("modi") = w13
   ttab3("ttime") = w14
    ttab3.Update
   End If
    ttab2.MoveNext
Loop

End Sub
Private Sub intobg()

Do Until ttab3.EOF
    b0 = ttab3("lsh")
    If ttab3("hzdw") = Empty Then b1 = " " Else b1 = ttab3("hzdw")
    If ttab3("hzname") = Empty Then b2 = " " Else b2 = ttab3("hzname")
    If ttab3("wzname") = Empty Then b3 = " " Else b3 = ttab3("wzname")
    If ttab3("cx") & "" = "" Then b4 = " " Else b4 = ttab3("cx")
    If ttab3("ch") = Empty Then b5 = " " Else b5 = ttab3("ch")
    If ttab3("mz") & "" = "" Then b6 = " " Else b6 = ttab3("mz")
    If ttab3("pz") & "" = "" Then b7 = " " Else b7 = ttab3("pz")
    If ttab3("hzl") & "" = "" Then b8 = " " Else b8 = ttab3("hzl")
    If ttab3("zj") & "" = "" Then b9 = " " Else b9 = ttab3("zj")
    If ttab3("rq") & "" = "" Then b10 = " " Else b10 = ttab3("rq")
    If ttab3("sby") & "" = "" Then b11 = " " Else b11 = ttab3("sby")
'    If ttab3("bz") & "" = "" Then b12 = " " Else b12 = ttab3("bz")
    bg.Row = 1
    bg.Col = 0
    If bg.Text = "" Then
       bg.Row = 1
       bg.Col = 0: bg.Text = b0
       bg.Col = 1: bg.Text = b1
       bg.Col = 2: bg.Text = b2
       bg.Col = 3: bg.Text = b3
       bg.Col = 4: bg.Text = b4
       bg.Col = 5: bg.Text = b5
       bg.Col = 6: bg.Text = b6
       bg.Col = 7: bg.Text = b7
       bg.Col = 8: bg.Text = b8
       bg.Col = 9: bg.Text = b9
       bg.Col = 10: bg.Text = b10
       bg.Col = 11: bg.Text = b11
   '    bg.Col = 12: bg.Text = b12
       
    Else
    bg.AddItem (b0 & vbTab & b1 & vbTab & b2 & vbTab & b3 & vbTab & b4 & vbTab & b5 & vbTab & b6 & vbTab & b7 & vbTab & b8 & vbTab & b9 & vbTab & b10 & vbTab & b11)
    End If
    ttab3.MoveNext
Loop

End Sub

Private Sub Command10_Click()
whotj = "按物资名称统计:"
If Text1.Text = "" Or Text2.Text = "" Or Text2.Text < Text1.Text Then
   MsgBox "日期非法,请重新选择!", vbExclamation + vbOKOnly, "图书管理系统"
   Exit Sub
End If
bdkk.Execute "delete * from tjb3"
hz = Combo1.Text

Set ttab2 = bdkk.OpenRecordset("select * from gcd where len(zj)>0 And rq <= '" + Text2.Text + "' And rq >= '" + Text1.Text + "' and wzname='" + hz + "'  and modi<>'0' ")
If ttab2.EOF Then
   MsgBox "无满足条件的记录!", vbExclamation + vbOKOnly, "图书管理系统"
   Exit Sub
End If
Set ttab3 = bdkk.OpenRecordset("tjb3")
refreshdata
Set ttab3 = bdkk.OpenRecordset("select * from tjb3 order by val(lsh)")
bgclear
intobg
ss = "select sum(val(zj)) as zja from tjb3 "
Set ttab3 = bdkk.OpenRecordset(ss)
a4 = ttab3("zja")
a4 = Format(a4, "0.00")
bg.AddItem ("" & vbTab & "净重统计" & vbTab & a4 & "t")
Command5.Enabled = True

End Sub

Private Sub Command11_Click()
whotj = "按车号统计:"
If Text1.Text = "" Or Text2.Text = "" Or Text2.Text < Text1.Text Then
   MsgBox "日期非法,请重新选择!", vbExclamation + vbOKOnly, "图书管理系统"
   Exit Sub
End If
bdkk.Execute "delete * from tjb3"
hz = Combo3.Text

Set ttab2 = bdkk.OpenRecordset("select * from gcd where len(zj)>0 And rq <= '" + Text2.Text + "' And rq >= '" + Text1.Text + "' and ch='" + hz + "'  and modi<>'0' ")
If ttab2.EOF Then
   MsgBox "无满足条件的记录!", vbExclamation + vbOKOnly, "图书管理系统"
   Exit Sub
End If
Set ttab3 = bdkk.OpenRecordset("tjb3")

⌨️ 快捷键说明

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