ʰ
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:23k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Begin VB.Form YH_FrmYeb 
  5.    Caption         =   "银行余额调节表"
  6.    ClientHeight    =   6375
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   10650
  10.    ForeColor       =   &H00000000&
  11.    HelpContextID   =   5104
  12.    Icon            =   "银行_余额调节表.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   6375
  16.    ScaleWidth      =   10650
  17.    Begin VB.PictureBox Pic_Title 
  18.       BackColor       =   &H00FFFFFF&
  19.       Height          =   1065
  20.       Left            =   30
  21.       Picture         =   "银行_余额调节表.frx":1042
  22.       ScaleHeight     =   1005
  23.       ScaleWidth      =   10545
  24.       TabIndex        =   0
  25.       Top             =   630
  26.       Width           =   10605
  27.       Begin VB.Label Lab_TitleMess 
  28.          AutoSize        =   -1  'True
  29.          BackStyle       =   0  'Transparent
  30.          Caption         =   "会计期间:"
  31.          Height          =   180
  32.          Index           =   0
  33.          Left            =   780
  34.          TabIndex        =   3
  35.          Top             =   750
  36.          Width           =   810
  37.       End
  38.       Begin VB.Label TsLabel 
  39.          AutoSize        =   -1  'True
  40.          BackColor       =   &H80000018&
  41.          BackStyle       =   0  'Transparent
  42.          Caption         =   "银行余额调节表"
  43.          BeginProperty Font 
  44.             Name            =   "宋体"
  45.             Size            =   14.25
  46.             Charset         =   134
  47.             Weight          =   700
  48.             Underline       =   0   'False
  49.             Italic          =   0   'False
  50.             Strikethrough   =   0   'False
  51.          EndProperty
  52.          ForeColor       =   &H00000000&
  53.          Height          =   285
  54.          Index           =   4
  55.          Left            =   420
  56.          TabIndex        =   2
  57.          Top             =   180
  58.          Width           =   2100
  59.       End
  60.       Begin VB.Label Lab_TitleText 
  61.          AutoSize        =   -1  'True
  62.          BackStyle       =   0  'Transparent
  63.          ForeColor       =   &H00000000&
  64.          Height          =   180
  65.          Index           =   0
  66.          Left            =   1650
  67.          TabIndex        =   1
  68.          Top             =   750
  69.          Width           =   90
  70.       End
  71.    End
  72.    Begin VB.Timer Timer1 
  73.       Enabled         =   0   'False
  74.       Interval        =   1
  75.       Left            =   7620
  76.       Top             =   90
  77.    End
  78.    Begin MSComctlLib.Toolbar GsToolbar 
  79.       Height          =   525
  80.       Left            =   10200
  81.       TabIndex        =   4
  82.       Top             =   0
  83.       Width           =   1665
  84.       _ExtentX        =   2937
  85.       _ExtentY        =   926
  86.       ButtonWidth     =   1455
  87.       ButtonHeight    =   926
  88.       AllowCustomize  =   0   'False
  89.       Appearance      =   1
  90.       Style           =   1
  91.       ImageList       =   "ImageList1"
  92.       _Version        =   393216
  93.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  94.          NumButtons      =   2
  95.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  96.             Caption         =   "保存格式"
  97.             Key             =   "bcgs"
  98.             ImageKey        =   "bcgs"
  99.          EndProperty
  100.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  101.             Caption         =   "默认列宽"
  102.             Key             =   "hfmrgs"
  103.             ImageKey        =   "mrlk"
  104.          EndProperty
  105.       EndProperty
  106.    End
  107.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  108.       Height          =   6885
  109.       Left            =   30
  110.       TabIndex        =   5
  111.       Top             =   1740
  112.       Width           =   11715
  113.       _cx             =   5080
  114.       _cy             =   5080
  115.       Appearance      =   1
  116.       BorderStyle     =   1
  117.       Enabled         =   -1  'True
  118.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  119.          Name            =   "宋体"
  120.          Size            =   9
  121.          Charset         =   134
  122.          Weight          =   400
  123.          Underline       =   0   'False
  124.          Italic          =   0   'False
  125.          Strikethrough   =   0   'False
  126.       EndProperty
  127.       MousePointer    =   0
  128.       BackColor       =   16777215
  129.       ForeColor       =   -2147483640
  130.       BackColorFixed  =   12632256
  131.       ForeColorFixed  =   -2147483630
  132.       BackColorSel    =   -2147483635
  133.       ForeColorSel    =   -2147483634
  134.       BackColorBkg    =   -2147483636
  135.       BackColorAlternate=   16777215
  136.       GridColor       =   -2147483633
  137.       GridColorFixed  =   -2147483632
  138.       TreeColor       =   -2147483632
  139.       FloodColor      =   192
  140.       SheetBorder     =   -2147483642
  141.       FocusRect       =   1
  142.       HighLight       =   1
  143.       AllowSelection  =   -1  'True
  144.       AllowBigSelection=   -1  'True
  145.       AllowUserResizing=   0
  146.       SelectionMode   =   0
  147.       GridLines       =   1
  148.       GridLinesFixed  =   2
  149.       GridLineWidth   =   1
  150.       Rows            =   50
  151.       Cols            =   10
  152.       FixedRows       =   1
  153.       FixedCols       =   1
  154.       RowHeightMin    =   0
  155.       RowHeightMax    =   0
  156.       ColWidthMin     =   0
  157.       ColWidthMax     =   0
  158.       ExtendLastCol   =   0   'False
  159.       FormatString    =   ""
  160.       ScrollTrack     =   0   'False
  161.       ScrollBars      =   3
  162.       ScrollTips      =   0   'False
  163.       MergeCells      =   0
  164.       MergeCompare    =   0
  165.       AutoResize      =   -1  'True
  166.       AutoSizeMode    =   0
  167.       AutoSearch      =   0
  168.       AutoSearchDelay =   2
  169.       MultiTotals     =   -1  'True
  170.       SubtotalPosition=   1
  171.       OutlineBar      =   0
  172.       OutlineCol      =   0
  173.       Ellipsis        =   0
  174.       ExplorerBar     =   0
  175.       PicturesOver    =   0   'False
  176.       FillStyle       =   0
  177.       RightToLeft     =   0   'False
  178.       PictureType     =   0
  179.       TabBehavior     =   0
  180.       OwnerDraw       =   0
  181.       Editable        =   0
  182.       ShowComboButton =   1
  183.       WordWrap        =   0   'False
  184.       TextStyle       =   0
  185.       TextStyleFixed  =   0
  186.       OleDragMode     =   0
  187.       OleDropMode     =   0
  188.       DataMode        =   0
  189.       VirtualData     =   -1  'True
  190.       DataMember      =   ""
  191.       ComboSearch     =   3
  192.       AutoSizeMouse   =   -1  'True
  193.       FrozenRows      =   0
  194.       FrozenCols      =   0
  195.       AllowUserFreezing=   0
  196.       BackColorFrozen =   0
  197.       ForeColorFrozen =   0
  198.       WallPaperAlignment=   9
  199.       AccessibleName  =   ""
  200.       AccessibleDescription=   ""
  201.       AccessibleValue =   ""
  202.       AccessibleRole  =   24
  203.    End
  204.    Begin MSComctlLib.Toolbar SzToolbar 
  205.       Align           =   1  'Align Top
  206.       Height          =   555
  207.       Left            =   0
  208.       TabIndex        =   6
  209.       Top             =   0
  210.       Width           =   10650
  211.       _ExtentX        =   18785
  212.       _ExtentY        =   979
  213.       ButtonWidth     =   820
  214.       ButtonHeight    =   926
  215.       AllowCustomize  =   0   'False
  216.       Appearance      =   1
  217.       Style           =   1
  218.       ImageList       =   "ImageList1"
  219.       _Version        =   393216
  220.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  221.          NumButtons      =   8
  222.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  223.             Caption         =   "设置"
  224.             Key             =   "ymsz"
  225.             ImageKey        =   "sz"
  226.          EndProperty
  227.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  228.             Caption         =   "打印"
  229.             Key             =   "dy"
  230.             ImageKey        =   "dy"
  231.          EndProperty
  232.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  233.             Caption         =   "预览"
  234.             Key             =   "yl"
  235.             ImageKey        =   "yl"
  236.          EndProperty
  237.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  238.             Style           =   3
  239.          EndProperty
  240.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  241.             Caption         =   "查看"
  242.             Key             =   "cx"
  243.             ImageKey        =   "cx"
  244.          EndProperty
  245.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  246.             Style           =   3
  247.          EndProperty
  248.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  249.             Caption         =   "帮助"
  250.             Key             =   "bz"
  251.             ImageKey        =   "bz"
  252.          EndProperty
  253.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  254.             Caption         =   "退出"
  255.             Key             =   "fh"
  256.             ImageKey        =   "tc"
  257.          EndProperty
  258.       EndProperty
  259.       BorderStyle     =   1
  260.       Begin MSComctlLib.ImageList ImageList1 
  261.          Left            =   7020
  262.          Top             =   0
  263.          _ExtentX        =   1005
  264.          _ExtentY        =   1005
  265.          BackColor       =   -2147483643
  266.          ImageWidth      =   16
  267.          ImageHeight     =   16
  268.          MaskColor       =   12632256
  269.          _Version        =   393216
  270.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  271.             NumListImages   =   32
  272.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "银行_余额调节表.frx":35106
  274.                Key             =   "sz"
  275.             EndProperty
  276.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "银行_余额调节表.frx":354A0
  278.                Key             =   "dy"
  279.             EndProperty
  280.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "银行_余额调节表.frx":3583A
  282.                Key             =   "yl"
  283.             EndProperty
  284.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "银行_余额调节表.frx":35BD4
  286.                Key             =   "xg"
  287.             EndProperty
  288.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "银行_余额调节表.frx":35F6E
  290.                Key             =   "zh"
  291.             EndProperty
  292.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "银行_余额调节表.frx":36308
  294.                Key             =   "sh"
  295.             EndProperty
  296.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "银行_余额调节表.frx":366A2
  298.                Key             =   "bc"
  299.             EndProperty
  300.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "银行_余额调节表.frx":36A3C
  302.                Key             =   "fq"
  303.             EndProperty
  304.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "银行_余额调节表.frx":36DD6
  306.                Key             =   "bz"
  307.             EndProperty
  308.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "银行_余额调节表.frx":37170
  310.                Key             =   "tc"
  311.             EndProperty
  312.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "银行_余额调节表.frx":3750A
  314.                Key             =   "bcgs"
  315.             EndProperty
  316.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "银行_余额调节表.frx":378A4
  318.                Key             =   "mrlk"
  319.             EndProperty
  320.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "银行_余额调节表.frx":37C3E
  322.                Key             =   "xsxm"
  323.             EndProperty
  324.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "银行_余额调节表.frx":37FD8
  326.                Key             =   "first"
  327.             EndProperty
  328.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "银行_余额调节表.frx":38372
  330.                Key             =   "prev"
  331.             EndProperty
  332.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "银行_余额调节表.frx":3870C
  334.                Key             =   "next"
  335.             EndProperty
  336.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "银行_余额调节表.frx":38AA6
  338.                Key             =   "last"
  339.             EndProperty
  340.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "银行_余额调节表.frx":38E40
  342.                Key             =   "xx"
  343.             EndProperty
  344.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  345.                Picture         =   "银行_余额调节表.frx":391DA
  346.                Key             =   "define"
  347.             EndProperty
  348.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  349.                Picture         =   "银行_余额调节表.frx":39574
  350.                Key             =   "exec"
  351.             EndProperty
  352.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  353.                Picture         =   "银行_余额调节表.frx":3990E
  354.                Key             =   "xz"
  355.             EndProperty
  356.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  357.                Picture         =   "银行_余额调节表.frx":39CA8
  358.                Key             =   "sc"
  359.             EndProperty
  360.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  361.                Picture         =   "银行_余额调节表.frx":3A042
  362.                Key             =   "sx"
  363.             EndProperty
  364.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  365.                Picture         =   "银行_余额调节表.frx":3A3DC
  366.                Key             =   "cx"
  367.             EndProperty
  368.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  369.                Picture         =   "银行_余额调节表.frx":3A776
  370.                Key             =   "zd"
  371.             EndProperty
  372.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  373.                Picture         =   "银行_余额调节表.frx":3AB10
  374.                Key             =   "dz"
  375.             EndProperty
  376.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  377.                Picture         =   "银行_余额调节表.frx":3AEAA
  378.                Key             =   "ph"
  379.             EndProperty
  380.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  381.                Picture         =   "银行_余额调节表.frx":3B244
  382.                Key             =   "fz"
  383.             EndProperty
  384.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  385.                Picture         =   "银行_余额调节表.frx":3B5DE
  386.                Key             =   "dw"
  387.             EndProperty
  388.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  389.                Picture         =   "银行_余额调节表.frx":3B978
  390.                Key             =   "hf"
  391.             EndProperty
  392.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  393.                Picture         =   "银行_余额调节表.frx":3BD12
  394.                Key             =   "pz"
  395.             EndProperty
  396.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  397.                Picture         =   "银行_余额调节表.frx":3C0AC
  398.                Key             =   "check"
  399.             EndProperty
  400.          EndProperty
  401.       End
  402.    End
  403. End
  404. Attribute VB_Name = "YH_FrmYeb"
  405. Attribute VB_GlobalNameSpace = False
  406. Attribute VB_Creatable = False
  407. Attribute VB_PredeclaredId = True
  408. Attribute VB_Exposed = False
  409. '*************************************************************
  410. '*    模 块 名 称 :银行余额调节表
  411. '*    功 能 描 述 :查询银行余额调节表
  412. '*    程序员姓名  : xjl
  413. '*    最后修改人  : xjl
  414. '*    最后修改时间:2001/07/07
  415. '*    备        注:
  416. '*************************************************************
  417. Dim ReportTitle As String                '报表主标题
  418. '以下为固定使用变量(网格)
  419. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  420. Dim GridCode As String                   '显示网格网格代码
  421. Dim GridInf() As Variant                 '整个网格设置信息
  422. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  423. Dim Sjhgd As Double                      '网格数据行高度
  424. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  425. Dim GridStr()  As String                 '网格列信息(字符型)
  426. Dim GridInt() As Integer                 '网格列信息(整型)
  427. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  428. '调用银行余额打印表
  429. Private Sub CxbbGrid_DblClick()
  430.     If CxbbGrid.Rows <= CxbbGrid.FixedRows Then
  431.         Exit Sub
  432.     End If
  433.     YH_FrmYeCx.HelpContextID = "0115005"
  434.     YH_FrmYeCx.Show 1
  435. End Sub
  436. '根据窗体大小来调整网格,标题栏大小
  437. Private Sub Form_Resize()
  438.     On Error Resume Next
  439.     With CxbbGrid
  440.         .Width = Me.Width - 160
  441.         .Height = Me.Height - .Top - 400
  442.     End With
  443.     With Pic_Title
  444.         .Width = Me.Width - 160
  445.     End With
  446.     
  447.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  448. End Sub
  449. '窗体装入
  450. Private Sub Form_Load()
  451.     Screen.MousePointer = 11
  452.     '调入打印页面设置窗体
  453.     XtReportCode = "Cwzz_yhyehzb"
  454.     Load Dyymctbl
  455.     ReportTitle = "银行余额调节表"
  456.     '调整标题栏及网格、格式工具条位置
  457.     Pic_Title.Left = 40
  458.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  459.     CxbbGrid.Left = Pic_Title.Left
  460.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  461.     '调入网格
  462.     GridCode = "Cwzz_yhye"
  463.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  464.     Qslz = GridInf(1)
  465.     Sjhgd = GridInf(2)
  466.     Sfxshjwg = GridInf(7)
  467.     Szzls = CxbbGrid.Cols - 1
  468.     '会计期间
  469.     Lab_TitleText(0) = Mid(Trim(Str(10000 + Xtyear)), 2, 4) + "." + Mid(Trim(Str(100 + Xtmm)), 2, 2)
  470.     Call Sub_ShowBill
  471.     Screen.MousePointer = 0
  472.     
  473.     '调整标题位置
  474.     SetTitlePos tsLabel(4)
  475.     
  476. End Sub
  477. '窗体卸载
  478. Private Sub Form_Unload(Cancel As Integer)
  479.     '卸载打印页面设置窗体
  480.     Unload Dyymctbl
  481. End Sub
  482. '报表打印预览
  483. Private Sub bbyl(bbylte As Boolean)
  484.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  485.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  486.     '报表小标题行数
  487.     Bbxbtgs = 1
  488.     '报表表尾行数
  489.     Bbbwhgs = 0
  490.     ReDim Bbxbt(1 To Bbxbtgs)
  491.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  492.     If Bbbwhgs <> 0 Then
  493.         ReDim Bbbwh(1 To Bbbwhgs)
  494.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  495.     End If
  496.     Bbzbt = ReportTitle
  497.     Bbxbt(1) = Space(2) + "会计期间:" + Lab_TitleText(0)
  498.     '报表行组织形式(0-居左 1-居中 2-居右)
  499.     bbxbtzzxs(1) = 0
  500.     '生成报表数据
  501.     Call Scyxsjb(CxbbGrid)
  502.     '生成报表
  503.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  504.     If Not bbylte Then
  505.         '卸载预览窗体
  506.         Unload DY_Tybbyldy
  507.     End If
  508. End Sub
  509. '显示银行企业调整前.调整后余额
  510. Private Sub Sub_ShowBill()
  511.     Dim RecTemp As New ADODB.Recordset                   '定义数据库
  512.     Dim Rowjsq As Integer
  513.     SQL_Str = "Select * From Cwzz_FUN_YETJB()"
  514.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  515.     With CxbbGrid
  516.         Rowjsq = 1
  517.         Do While Not RecTemp.EOF()
  518.             If Rowjsq >= .Rows - 1 Then
  519.                 .AddItem ""
  520.             End If
  521.             .TextMatrix(Rowjsq, 0) = Trim(RecTemp.Fields("ccode"))
  522.             .TextMatrix(Rowjsq, 2) = Trim(RecTemp.Fields("cname"))
  523.             If Val(RecTemp.Fields("DW_Bef")) <> 0 Then
  524.                 .TextMatrix(Rowjsq, 3) = CStr(RecTemp.Fields("DW_Bef"))
  525.             End If
  526.             If Val(RecTemp.Fields("YH_Bef")) <> 0 Then
  527.                 .TextMatrix(Rowjsq, 4) = CStr(RecTemp.Fields("YH_Bef"))
  528.             End If
  529.             If Val((RecTemp.Fields("YH_Las"))) Then
  530.                 .TextMatrix(Rowjsq, 5) = CStr(RecTemp.Fields("YH_Las"))
  531.             End If
  532.             If Val((RecTemp.Fields("DW_Las"))) <> 0 Then
  533.                 .TextMatrix(Rowjsq, 6) = CStr(RecTemp.Fields("DW_Las"))
  534.             End If
  535.             If CStr(RecTemp.Fields("BHF")) = "1" Then
  536.                 .TextMatrix(Rowjsq, 7) = "平衡"
  537.             Else
  538.                 .TextMatrix(Rowjsq, 7) = "不平衡"
  539.                 .Cell(flexcpForeColor, Rowjsq, 7) = vbRed
  540.             End If
  541.             .RowHeight(Rowjsq) = Sjhgd
  542.             Rowjsq = Rowjsq + 1
  543.             RecTemp.MoveNext
  544.         Loop
  545.     End With
  546.     '网格格式
  547.     Call FormatMoney
  548. End Sub
  549. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  550.     Select Case Button.Key
  551.     Case "bcgs"                              '保存表格格式
  552.         Call Bcwggs(CxbbGrid, GridCode, GridStr())
  553.     Case "hfmrgs"                            '恢复默认格式
  554.         Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  555.     Case "szxsxm"                            '设置显示项目
  556.         Call Szxsxm(CxbbGrid, GridCode)
  557.     End Select
  558. End Sub
  559. '定义工具条
  560. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  561.     Select Case Button.Key
  562.     Case "ymsz"                                          '页面设置
  563.         Dyymctbl.Show 1
  564.     Case "yl"                                            '预  览
  565.         Call bbyl(True)
  566.     Case "dy"                                            '打 印
  567.         Call bbyl(False)
  568.     Case "cx"                                            '查 询
  569.         If CxbbGrid.Rows <= CxbbGrid.FixedRows Then
  570.             Exit Sub
  571.         End If
  572.         YH_FrmYeCx.HelpContextID = "0115005"
  573.         YH_FrmYeCx.Show 1
  574.     Case "fh"                                            '退 出
  575.         Unload Me
  576.     Case "bz"
  577.         Call F1bz
  578.     End Select
  579. End Sub
  580. '网格格式
  581. Private Sub FormatMoney()
  582.     Dim Rowjsq As Integer
  583.     With CxbbGrid
  584.         .ColAlignment(7) = flexAlignCenterCenter
  585.         For Rowjsq = 1 To .Rows - 1
  586.             .TextMatrix(Rowjsq, 3) = Format(.TextMatrix(Rowjsq, 3), "#,###.00")
  587.             .TextMatrix(Rowjsq, 4) = Format(.TextMatrix(Rowjsq, 4), "#,###.00")
  588.             .TextMatrix(Rowjsq, 5) = Format(.TextMatrix(Rowjsq, 5), "#,###.00")
  589.             .TextMatrix(Rowjsq, 6) = Format(.TextMatrix(Rowjsq, 6), "#,###.00")
  590.         Next Rowjsq
  591.     End With
  592. End Sub