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

企业管理

开发平台:

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 ZF_Kh_Frmslmxzjg 
  5.    Caption         =   "客户三栏明细帐"
  6.    ClientHeight    =   7755
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11355
  10.    HelpContextID   =   5001
  11.    Icon            =   "辅助_客户_三栏明细帐查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   7755
  16.    ScaleWidth      =   11355
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.Timer Timer1 
  19.       Enabled         =   0   'False
  20.       Interval        =   1
  21.       Left            =   7620
  22.       Top             =   90
  23.    End
  24.    Begin VB.PictureBox Pic_Title 
  25.       Height          =   1425
  26.       Left            =   0
  27.       Picture         =   "辅助_客户_三栏明细帐查询结果.frx":1042
  28.       ScaleHeight     =   1365
  29.       ScaleWidth      =   11535
  30.       TabIndex        =   0
  31.       Top             =   600
  32.       Width           =   11595
  33.       Begin VB.CommandButton Cmd_CancelPrint 
  34.          Caption         =   "取消打印(&C)"
  35.          Height          =   405
  36.          Left            =   8580
  37.          TabIndex        =   17
  38.          Top             =   150
  39.          Visible         =   0   'False
  40.          Width           =   1155
  41.       End
  42.       Begin VB.ComboBox Combo_AccFormat 
  43.          Height          =   300
  44.          Left            =   9330
  45.          Style           =   2  'Dropdown List
  46.          TabIndex        =   5
  47.          Top             =   1020
  48.          Width           =   1275
  49.       End
  50.       Begin MSComctlLib.ImageCombo Imgebo_FzCode 
  51.          Height          =   315
  52.          Left            =   1710
  53.          TabIndex        =   15
  54.          Top             =   990
  55.          Width           =   3315
  56.          _ExtentX        =   5847
  57.          _ExtentY        =   556
  58.          _Version        =   393216
  59.          ForeColor       =   -2147483640
  60.          BackColor       =   -2147483643
  61.          Locked          =   -1  'True
  62.       End
  63.       Begin VB.Label Lab_Ccode 
  64.          BackStyle       =   0  'Transparent
  65.          ForeColor       =   &H00000000&
  66.          Height          =   315
  67.          Left            =   1710
  68.          TabIndex        =   16
  69.          Top             =   750
  70.          Width           =   2985
  71.       End
  72.       Begin VB.Label Lab_TitleMess 
  73.          BackStyle       =   0  'Transparent
  74.          Caption         =   "科目名称:"
  75.          Height          =   225
  76.          Index           =   1
  77.          Left            =   870
  78.          TabIndex        =   14
  79.          Top             =   750
  80.          Width           =   825
  81.       End
  82.       Begin VB.Label Lab_TitleMess 
  83.          BackStyle       =   0  'Transparent
  84.          Caption         =   "往来客户:"
  85.          Height          =   225
  86.          Index           =   3
  87.          Left            =   870
  88.          TabIndex        =   13
  89.          Top             =   1050
  90.          Width           =   915
  91.       End
  92.       Begin VB.Label Lab_TitleText 
  93.          BackStyle       =   0  'Transparent
  94.          ForeColor       =   &H00000000&
  95.          Height          =   225
  96.          Index           =   1
  97.          Left            =   6240
  98.          TabIndex        =   12
  99.          Top             =   720
  100.          Width           =   1395
  101.       End
  102.       Begin VB.Label Lab_TitleMess 
  103.          BackStyle       =   0  'Transparent
  104.          Caption         =   "外币名称:"
  105.          Height          =   225
  106.          Index           =   2
  107.          Left            =   5340
  108.          TabIndex        =   11
  109.          Top             =   720
  110.          Visible         =   0   'False
  111.          Width           =   915
  112.       End
  113.       Begin VB.Label Label1 
  114.          Appearance      =   0  'Flat
  115.          BackColor       =   &H80000005&
  116.          BackStyle       =   0  'Transparent
  117.          Caption         =   "未记帐明细会计分录"
  118.          ForeColor       =   &H80000008&
  119.          Height          =   195
  120.          Index           =   2
  121.          Left            =   8880
  122.          TabIndex        =   9
  123.          Top             =   720
  124.          Width           =   1665
  125.       End
  126.       Begin VB.Label Lab_Color 
  127.          Appearance      =   0  'Flat
  128.          BackColor       =   &H00FFFFC0&
  129.          BorderStyle     =   1  'Fixed Single
  130.          ForeColor       =   &H80000008&
  131.          Height          =   195
  132.          Index           =   0
  133.          Left            =   8580
  134.          TabIndex        =   8
  135.          Top             =   720
  136.          Width           =   195
  137.       End
  138.       Begin VB.Label Lab_TitleText 
  139.          BackStyle       =   0  'Transparent
  140.          ForeColor       =   &H00FF0000&
  141.          Height          =   225
  142.          Index           =   0
  143.          Left            =   6270
  144.          TabIndex        =   7
  145.          Top             =   1050
  146.          Width           =   1815
  147.       End
  148.       Begin VB.Label TsLabel 
  149.          BackStyle       =   0  'Transparent
  150.          Caption         =   "帐页格式:"
  151.          Height          =   225
  152.          Index           =   7
  153.          Left            =   8490
  154.          TabIndex        =   6
  155.          Top             =   1080
  156.          Width           =   855
  157.       End
  158.       Begin VB.Label TsLabel 
  159.          BackColor       =   &H80000018&
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "客户三栏明细帐"
  162.          BeginProperty Font 
  163.             Name            =   "宋体"
  164.             Size            =   14.25
  165.             Charset         =   134
  166.             Weight          =   700
  167.             Underline       =   0   'False
  168.             Italic          =   0   'False
  169.             Strikethrough   =   0   'False
  170.          EndProperty
  171.          ForeColor       =   &H00000000&
  172.          Height          =   330
  173.          Index           =   4
  174.          Left            =   570
  175.          TabIndex        =   2
  176.          Top             =   150
  177.          Width           =   2325
  178.       End
  179.       Begin VB.Label Lab_TitleMess 
  180.          BackStyle       =   0  'Transparent
  181.          Caption         =   "会计期间:"
  182.          Height          =   225
  183.          Index           =   0
  184.          Left            =   5310
  185.          TabIndex        =   1
  186.          Top             =   1050
  187.          Width           =   915
  188.       End
  189.    End
  190.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  191.       Height          =   5265
  192.       Left            =   30
  193.       TabIndex        =   3
  194.       Top             =   2100
  195.       Width           =   11715
  196.       _cx             =   5080
  197.       _cy             =   5080
  198.       Appearance      =   1
  199.       BorderStyle     =   1
  200.       Enabled         =   -1  'True
  201.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  202.          Name            =   "宋体"
  203.          Size            =   9
  204.          Charset         =   134
  205.          Weight          =   400
  206.          Underline       =   0   'False
  207.          Italic          =   0   'False
  208.          Strikethrough   =   0   'False
  209.       EndProperty
  210.       MousePointer    =   0
  211.       BackColor       =   16777215
  212.       ForeColor       =   -2147483640
  213.       BackColorFixed  =   12632256
  214.       ForeColorFixed  =   -2147483630
  215.       BackColorSel    =   -2147483635
  216.       ForeColorSel    =   -2147483634
  217.       BackColorBkg    =   -2147483636
  218.       BackColorAlternate=   16777215
  219.       GridColor       =   -2147483633
  220.       GridColorFixed  =   -2147483632
  221.       TreeColor       =   -2147483632
  222.       FloodColor      =   192
  223.       SheetBorder     =   -2147483642
  224.       FocusRect       =   1
  225.       HighLight       =   1
  226.       AllowSelection  =   -1  'True
  227.       AllowBigSelection=   -1  'True
  228.       AllowUserResizing=   0
  229.       SelectionMode   =   0
  230.       GridLines       =   1
  231.       GridLinesFixed  =   2
  232.       GridLineWidth   =   1
  233.       Rows            =   50
  234.       Cols            =   10
  235.       FixedRows       =   1
  236.       FixedCols       =   1
  237.       RowHeightMin    =   0
  238.       RowHeightMax    =   0
  239.       ColWidthMin     =   0
  240.       ColWidthMax     =   0
  241.       ExtendLastCol   =   0   'False
  242.       FormatString    =   ""
  243.       ScrollTrack     =   0   'False
  244.       ScrollBars      =   3
  245.       ScrollTips      =   0   'False
  246.       MergeCells      =   0
  247.       MergeCompare    =   0
  248.       AutoResize      =   -1  'True
  249.       AutoSizeMode    =   0
  250.       AutoSearch      =   0
  251.       AutoSearchDelay =   2
  252.       MultiTotals     =   -1  'True
  253.       SubtotalPosition=   1
  254.       OutlineBar      =   0
  255.       OutlineCol      =   0
  256.       Ellipsis        =   0
  257.       ExplorerBar     =   0
  258.       PicturesOver    =   0   'False
  259.       FillStyle       =   0
  260.       RightToLeft     =   0   'False
  261.       PictureType     =   0
  262.       TabBehavior     =   0
  263.       OwnerDraw       =   0
  264.       Editable        =   0
  265.       ShowComboButton =   1
  266.       WordWrap        =   0   'False
  267.       TextStyle       =   0
  268.       TextStyleFixed  =   0
  269.       OleDragMode     =   0
  270.       OleDropMode     =   0
  271.       DataMode        =   0
  272.       VirtualData     =   -1  'True
  273.       DataMember      =   ""
  274.       ComboSearch     =   3
  275.       AutoSizeMouse   =   -1  'True
  276.       FrozenRows      =   0
  277.       FrozenCols      =   0
  278.       AllowUserFreezing=   0
  279.       BackColorFrozen =   0
  280.       ForeColorFrozen =   0
  281.       WallPaperAlignment=   9
  282.       AccessibleName  =   ""
  283.       AccessibleDescription=   ""
  284.       AccessibleValue =   ""
  285.       AccessibleRole  =   24
  286.    End
  287.    Begin MSComctlLib.Toolbar SzToolbar 
  288.       Align           =   1  'Align Top
  289.       Height          =   555
  290.       Left            =   0
  291.       TabIndex        =   4
  292.       Top             =   0
  293.       Width           =   11355
  294.       _ExtentX        =   20029
  295.       _ExtentY        =   979
  296.       ButtonWidth     =   820
  297.       ButtonHeight    =   926
  298.       AllowCustomize  =   0   'False
  299.       Appearance      =   1
  300.       Style           =   1
  301.       ImageList       =   "ImageList1"
  302.       _Version        =   393216
  303.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  304.          NumButtons      =   11
  305.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  306.             Caption         =   "设置"
  307.             Key             =   "ymsz"
  308.             ImageKey        =   "sz"
  309.          EndProperty
  310.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  311.             Caption         =   "打印"
  312.             Key             =   "dy"
  313.             ImageKey        =   "dy"
  314.          EndProperty
  315.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  316.             Caption         =   "预览"
  317.             Key             =   "yl"
  318.             ImageKey        =   "yl"
  319.          EndProperty
  320.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  321.             Caption         =   "连打"
  322.             Key             =   "lxdy"
  323.             ImageKey        =   "lxdy"
  324.          EndProperty
  325.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  326.             Style           =   3
  327.          EndProperty
  328.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  329.             Caption         =   "查询"
  330.             Key             =   "cx"
  331.             ImageKey        =   "cx"
  332.          EndProperty
  333.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  334.             Style           =   3
  335.          EndProperty
  336.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  337.             Caption         =   "凭证"
  338.             Key             =   "pz"
  339.             ImageKey        =   "pz"
  340.          EndProperty
  341.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  342.             Style           =   3
  343.          EndProperty
  344.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  345.             Caption         =   "帮助"
  346.             Key             =   "bz"
  347.             ImageKey        =   "bz"
  348.          EndProperty
  349.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  350.             Caption         =   "退出"
  351.             Key             =   "fh"
  352.             ImageKey        =   "tc"
  353.          EndProperty
  354.       EndProperty
  355.       BorderStyle     =   1
  356.       Begin MSComctlLib.ImageList ImageList1 
  357.          Left            =   6000
  358.          Top             =   30
  359.          _ExtentX        =   1005
  360.          _ExtentY        =   1005
  361.          BackColor       =   -2147483643
  362.          ImageWidth      =   16
  363.          ImageHeight     =   16
  364.          MaskColor       =   12632256
  365.          _Version        =   393216
  366.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  367.             NumListImages   =   36
  368.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  369.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":35106
  370.                Key             =   "sz"
  371.             EndProperty
  372.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  373.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":354A0
  374.                Key             =   "dy"
  375.             EndProperty
  376.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  377.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3583A
  378.                Key             =   "yl"
  379.             EndProperty
  380.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  381.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":35BD4
  382.                Key             =   "xg"
  383.             EndProperty
  384.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  385.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":35F6E
  386.                Key             =   "zh"
  387.             EndProperty
  388.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  389.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":36308
  390.                Key             =   "sh"
  391.             EndProperty
  392.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  393.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":366A2
  394.                Key             =   "bc"
  395.             EndProperty
  396.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  397.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":36A3C
  398.                Key             =   "fq"
  399.             EndProperty
  400.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  401.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":36DD6
  402.                Key             =   "bz"
  403.             EndProperty
  404.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  405.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":37170
  406.                Key             =   "tc"
  407.             EndProperty
  408.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  409.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3750A
  410.                Key             =   "bcgs"
  411.             EndProperty
  412.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  413.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":378A4
  414.                Key             =   "mrlk"
  415.             EndProperty
  416.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  417.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":37C3E
  418.                Key             =   "xsxm"
  419.             EndProperty
  420.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  421.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":37FD8
  422.                Key             =   "first"
  423.             EndProperty
  424.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  425.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":38372
  426.                Key             =   "prev"
  427.             EndProperty
  428.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  429.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3870C
  430.                Key             =   "next"
  431.             EndProperty
  432.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  433.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":38AA6
  434.                Key             =   "last"
  435.             EndProperty
  436.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  437.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":38E40
  438.                Key             =   "xx"
  439.             EndProperty
  440.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  441.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":391DA
  442.                Key             =   "define"
  443.             EndProperty
  444.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  445.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":39574
  446.                Key             =   "exec"
  447.             EndProperty
  448.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  449.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3990E
  450.                Key             =   "xz"
  451.             EndProperty
  452.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  453.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":39CA8
  454.                Key             =   "sc"
  455.             EndProperty
  456.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  457.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3A042
  458.                Key             =   "sx"
  459.             EndProperty
  460.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  461.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3A3DC
  462.                Key             =   "cx"
  463.             EndProperty
  464.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  465.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3A776
  466.                Key             =   "zd"
  467.             EndProperty
  468.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  469.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3AB10
  470.                Key             =   "dz"
  471.             EndProperty
  472.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  473.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3AEAA
  474.                Key             =   "ph"
  475.             EndProperty
  476.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  477.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3B244
  478.                Key             =   "fz"
  479.             EndProperty
  480.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  481.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3B5DE
  482.                Key             =   "dw"
  483.             EndProperty
  484.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  485.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3B978
  486.                Key             =   "hf"
  487.             EndProperty
  488.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  489.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3BD12
  490.                Key             =   "pz"
  491.             EndProperty
  492.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  493.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3C0AC
  494.                Key             =   "check"
  495.             EndProperty
  496.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  497.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3C446
  498.                Key             =   "zz"
  499.             EndProperty
  500.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  501.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3C7E0
  502.                Key             =   "mx"
  503.             EndProperty
  504.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  505.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3CB7A
  506.                Key             =   "lj"
  507.             EndProperty
  508.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  509.                Picture         =   "辅助_客户_三栏明细帐查询结果.frx":3CF14
  510.                Key             =   "lxdy"
  511.             EndProperty
  512.          EndProperty
  513.       End
  514.       Begin MSComctlLib.Toolbar GsToolbar 
  515.          Height          =   525
  516.          Left            =   9660
  517.          TabIndex        =   10
  518.          Top             =   0
  519.          Width           =   1665
  520.          _ExtentX        =   2937
  521.          _ExtentY        =   926
  522.          ButtonWidth     =   1455
  523.          ButtonHeight    =   926
  524.          AllowCustomize  =   0   'False
  525.          Appearance      =   1
  526.          Style           =   1
  527.          ImageList       =   "ImageList1"
  528.          _Version        =   393216
  529.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  530.             NumButtons      =   2
  531.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  532.                Caption         =   "保存格式"
  533.                Key             =   "bcgs"
  534.                ImageKey        =   "bcgs"
  535.             EndProperty
  536.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  537.                Caption         =   "默认列宽"
  538.                Key             =   "hfmrgs"
  539.                ImageKey        =   "mrlk"
  540.             EndProperty
  541.          EndProperty
  542.       End
  543.    End
  544. End
  545. Attribute VB_Name = "ZF_Kh_Frmslmxzjg"
  546. Attribute VB_GlobalNameSpace = False
  547. Attribute VB_Creatable = False
  548. Attribute VB_PredeclaredId = True
  549. Attribute VB_Exposed = False
  550. '**********************************************************************
  551. '*    模 块 名 称 :(客户)科目三栏明细帐
  552. '*    功 能 描 述 :本功能用于查询某科目某客户在某月或某几月的明细帐情况
  553. '*                 并且能够进行立体联查凭证及总帐数据。
  554. '*    程序员姓名  : 张建忠
  555. '*    最后修改人  : 奚俊峰
  556. '*    最后修改时间:2001.12.31
  557. '*    备        注:
  558. '**********************************************************************
  559. Dim ReportTitle As String                '报表主标题
  560. Dim Bln_ConVertFlag As Boolean           '外币折算方式
  561. Dim Int_Wbhlxsws As Integer              '外币汇率小数位数
  562. Dim Bln_CancelPrint As Boolean           '用户是否取消打印
  563. Dim Bln_Printing As Boolean              '用户是否正在打印
  564. '以下为固定使用变量
  565. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  566. Dim GridCode As String                   '显示网格网格代码
  567. Dim GridInf() As Variant                 '整个网格设置信息
  568. Dim Tsxx As String                       '系统提示信息
  569. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  570. Dim Sjhgd As Double                      '网格数据行高度
  571. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  572. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  573. Dim GridStr()  As String                 '网格列信息(字符型)
  574. Dim GridInt() As Integer                 '网格列信息(整型)
  575. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  576. Dim Bln_Stop As Boolean                  '停止输出查询结果
  577. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  578.     On Error Resume Next
  579.     With CxbbGrid
  580.         .Width = Me.Width - 160
  581.         .Height = Me.Height - .Top - 400
  582.     End With
  583.     With Pic_Title
  584.         .Width = Me.Width - 160
  585.     End With
  586.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  587. End Sub
  588. Private Sub Form_Load()                                                   '窗体装入
  589.     '调入打印页面设置窗体
  590.     XtReportCode = "Cwzz_bm_slmxz"
  591.     Load Dyymctbl
  592.     ReportTitle = "客户三栏明细帐"
  593.     
  594.     '调整标题栏及网格、格式工具条位置
  595.     Pic_Title.Left = 40
  596.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  597.     CxbbGrid.Left = Pic_Title.Left
  598.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  599.     
  600.     '调 入 网 格
  601.     GridCode = "Cwzz_kh_slmxz"
  602.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  603.     Qslz = GridInf(1)
  604.     Sjhgd = GridInf(2)
  605.     Sfxshjwg = GridInf(7)
  606.     Szzls = CxbbGrid.Cols - 1
  607.     
  608.     '帐页格式
  609.     Call FillCombo(Combo_AccFormat, "Cwzz_zygs", "", 0)
  610.     
  611.     '调整标题位置
  612.     SetTitlePos tsLabel(4)
  613.     
  614. End Sub
  615. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  616.     
  617.     '如果用户正在连续打印帐页,则不能关闭窗体
  618.     If Bln_Printing Then
  619.         Cancel = 1
  620.     End If
  621.     
  622.     '卸载条件窗体
  623.     ZF_Kh_Frmslmxztj.UnloadCheck.Value = 1
  624.     Unload ZF_Kh_Frmslmxztj
  625.     
  626.     '卸载打印页面设置窗体
  627.     Unload Dyymctbl
  628. End Sub
  629. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  630.     Select Case Button.Key
  631.     Case "bcgs"                                          '保存表格格式
  632.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  633.     Case "hfmrgs"                                        '恢复默认格式
  634.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  635.     Case "szxsxm"                                        '设置显示项目
  636.         Call Szxsxm(CxbbGrid, GridCode)
  637.     End Select
  638. End Sub
  639. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  640.     '如果用户正在连续打印帐页,则不能执行其他功能
  641.     If Bln_Printing Then
  642.         Exit Sub
  643.     End If
  644.     Select Case Button.Key
  645.     Case "ymsz"                                          '页面设置
  646.         Dyymctbl.Show 1
  647.     Case "yl"                                            '预 览
  648.         Call bbyl(True)
  649.     Case "dy"                                            '打 印
  650.         Call bbyl(False)
  651.     Case "lxdy"                                          '连 打
  652.         Call Sub_Lxdy
  653.     Case "cx"                                            '查 询
  654.         ZF_Kh_Frmslmxztj.Show 1
  655.     Case "pz"                                            '凭 证
  656.         Call CxbbGrid_DblClick
  657.     Case "bz"                                            '帮 助
  658.         Call F1bz
  659.     Case "fh"                                            '退 出
  660.         Unload Me
  661.     End Select
  662. End Sub
  663. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  664.     Timer1.Enabled = False
  665.     
  666.     '查询客户
  667.     Call FillImageCombo(Imgebo_FzCode, "Cwzz_cus", 0)
  668.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  669.         If Imgebo_FzCode.ComboItems.Item(Jsqte).Key = "@" + Trim(ZF_Kh_Frmslmxztj.LrText(0).Tag) Then
  670.             Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  671.             Imgebo_FzCode.Refresh
  672.             Exit For
  673.         End If
  674.     Next Jsqte
  675.     Call Imgebo_FzCode_Click
  676. End Sub
  677. Private Sub Imgebo_FzCode_Click()
  678.     Timer1.Enabled = False
  679.     Xt_Wait.Show
  680.     Xt_Wait.Refresh
  681.     
  682.     '加快显示速度
  683.     CxbbGrid.Redraw = False
  684.     
  685.     '生成查询结果
  686.     Call Sub_Query
  687.     
  688.     CxbbGrid.Redraw = True
  689.     Xt_Wait.Hide
  690. End Sub
  691. Private Sub Sub_Query()                                    '生成查询结果
  692.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  693.     Dim Sqlstr As String                        '查询字符串
  694.     Dim Coljsq As Long                          '网格列计数器
  695.     Dim Jsqte As Long                           '临时动态计数器
  696.     Dim Str_Ccode As String                     '查询会计科目
  697.     Dim Str_FzCode As String                    '查询辅助客户编码
  698.     Dim Int_BPeriod As Integer                  '查询起始会计期间
  699.     Dim Int_EPeriod As Integer                  '查询终止会计期间
  700.     Dim Int_Year As Integer                     '查询会计年度
  701.     Dim Bln_IncluNotBook As Boolean             '是否包含未记帐凭证
  702.     Dim Bln_QcZeroShow As Boolean               '查询会计期间期初数据如果为零是否显示
  703.     Dim Bln_CqGcShow As Boolean                 '是否显示承前过次
  704.     Dim Int_Zdzyhs As Integer                   '正式帐页指定报表行数
  705.     Dim Bln_EndFlag As Boolean                  '判断当前科目是否为末级科目
  706.     Dim Int_DqPeriod As Integer                 '查询进行当前会计期间
  707.     Dim Bln_NotFirst As Boolean                 '是否为首次循环
  708.     Dim Bln_ForeignFlag As Boolean              '判断此科目是否外币核算
  709.     Dim Lng_MonthCount As Long                  '本月明细帐记录条数
  710.     Dim Lng_YearCount As Long                   '本年明细帐记录条数
  711.     
  712.     Dim Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#   '期初金额,数量,外币
  713.     Dim Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj# '本期合计(金额,数量,外币)
  714.     Dim Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj# '截止累计(金额,数量,外币)
  715.     Dim Dbl_Qmyete#, Dbl_Qmslte#, Dbl_Qmwbte#   '期末金额,数量,外币
  716.     '以下为用户自定义部分[
  717.     
  718.     '清除原查询数据
  719.     CxbbGrid.Rows = CxbbGrid.FixedRows
  720.     With ZF_Kh_Frmslmxztj
  721.         '得到当前查询科目,并判断是否为末级科目
  722.         Lab_Ccode.Caption = .Imgebo_FzCcode.Text
  723.         Str_Ccode = GetComboKey(.Imgebo_FzCcode, 0)
  724.         Sqlstr = "SELECT EndFlag,AccFormat,ForeignFlag,ForeignCurrName,ConVertFlag,IDec From Cwzz_AccCode Left JOIN Gy_ForeignCurrency ON" & _
  725.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode Where Ccode='" & Str_Ccode & "'"
  726.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  727.         If Not RecTemp.EOF Then
  728.             Bln_EndFlag = RecTemp.Fields("EndFlag")
  729.             Combo_AccFormat.Text = Trim(RecTemp.Fields("AccFormat"))
  730.             If RecTemp.Fields("ForeignFlag") Then
  731.                 Bln_ForeignFlag = True
  732.                 Lab_TitleMess(2).Visible = True
  733.                 Lab_TitleText(1).Caption = Trim(RecTemp.Fields("ForeignCurrName") & "")
  734.                 Bln_ForeignFlag = True
  735.                 Bln_ConVertFlag = IIf(IsNull(RecTemp.Fields("ConVertFlag")), False, RecTemp.Fields("ConVertFlag"))
  736.                 Int_Wbhlxsws = RecTemp.Fields("IDec")
  737.             Else
  738.                 Lab_TitleMess(2).Visible = False
  739.                 Bln_ForeignFlag = False
  740.                 Lab_TitleText(1).Caption = ""
  741.             End If
  742.         End If
  743.         
  744.         '得到查询辅助客户编码
  745.         Str_FzCode = GetComboKey(Imgebo_FzCode, 0)
  746.         
  747.         '得到查询起始和截止会计期间,并判断是否包含未记帐凭证
  748.         Int_Year = Int(Mid(.Combo_Kjqj(0).Text, 1, 4))
  749.         Int_BPeriod = Int(Mid(.Combo_Kjqj(0).Text, 6, 2))
  750.         Int_EPeriod = Int(Mid(.Combo_Kjqj(1).Text, 6, 2))
  751.         Lab_TitleText(0).Caption = .Combo_Kjqj(0).Text & "--" & .Combo_Kjqj(1).Text
  752.         
  753.         '是否包含未记帐凭证
  754.         If .Chk_NotBook.Value = 1 Then
  755.             Bln_IncluNotBook = True
  756.         Else
  757.             Bln_IncluNotBook = False
  758.         End If
  759.         
  760.         '查询会计期间期初数据如果为零是否显示
  761.         If .Chk_QcZeroShow = 1 Then
  762.             Bln_QcZeroShow = True
  763.         Else
  764.             Bln_QcZeroShow = False
  765.         End If
  766.     End With
  767.     
  768.     '初始化各种值
  769.     Dbl_Qcyete = 0
  770.     Dbl_Qcslte = 0
  771.     Dbl_Qcwbte = 0
  772.     
  773.     Dbl_Jejfhj = 0
  774.     Dbl_Jedfhj = 0
  775.     Dbl_Sljfhj = 0
  776.     Dbl_Sldfhj = 0
  777.     Dbl_Wbjfhj = 0
  778.     Dbl_Wbdfhj = 0
  779.     
  780.     Dbl_Jejflj = 0
  781.     Dbl_Jedflj = 0
  782.     Dbl_Sljflj = 0
  783.     Dbl_Sldflj = 0
  784.     Dbl_Wbjflj = 0
  785.     Dbl_Wbdflj = 0
  786.     
  787.     Lng_MonthCount = 0
  788.     Lng_YearCount = 0
  789.     
  790.     Jsqte = CxbbGrid.FixedRows - 1
  791.     
  792.     '1.计算期初余额(金额,数量,外币),并计算截止查询起始会计期间累计数据
  793.     Sqlstr = "SELECT Qcyehj=Isnull(Sum(Qcye),0),Qcslhj=Isnull(Sum(Qcsl),0),Qcwbhj=Isnull(Sum(Qcwb),0), " & _
  794.     " Byjfljjehj=Isnull(Sum(Byjfljje-Mjje),0),Bydfljjehj=Isnull(Sum(Bydfljje-Mdje),0),Byjfljslhj=Isnull(Sum(Byjfljsl-Mjsl),0)," & _
  795.     " Bydfljslhj=Isnull(Sum(Bydfljsl-Mdsl),0),Byjfljwbhj=Isnull(Sum(Byjfljwb-Mjwb),0),Bydfljwbhj=Isnull(Sum(Bydfljwb-Mdwb),0) " & _
  796.     " From Cwzz_AccSumassi Where Ccode like '" & Str_Ccode & "%' And CusCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  797.     " And Period=" & Int_BPeriod
  798.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  799.     If Not RecTemp.EOF Then
  800.         Dbl_Qcyete = RecTemp.Fields("Qcyehj")
  801.         Dbl_Qcslte = RecTemp.Fields("Qcslhj")
  802.         Dbl_Qcwbte = RecTemp.Fields("Qcwbhj")
  803.         
  804.         '截止累计数据需要减掉本会计期间相应记帐数据
  805.         Dbl_Jejflj = RecTemp.Fields("Byjfljjehj")
  806.         Dbl_Jedflj = RecTemp.Fields("Bydfljjehj")
  807.         Dbl_Sljflj = RecTemp.Fields("Byjfljslhj")
  808.         Dbl_Sldflj = RecTemp.Fields("Bydfljslhj")
  809.         Dbl_Wbjflj = RecTemp.Fields("Byjfljwbhj")
  810.         Dbl_Wbdflj = RecTemp.Fields("Bydfljwbhj")
  811.     End If
  812.     
  813.     '如果包含未记帐凭证则计算小于查询起始会计期间包含科目借贷方合计
  814.     If Bln_IncluNotBook Then
  815.         Sqlstr = "SELECT Jfjehj=Isnull(Sum(Jfje),0),Dfjehj=Isnull(Sum(Dfje),0),Jfslhj=Isnull(Sum(Jfsl),0),Dfslhj=Isnull(Sum(Dfsl),0) " & _
  816.         ",Wbjfjehj=Isnull(Sum(Wbjfje),0),Wbdfjehj=Isnull(Sum(Wbdfje),0) From Cwzz_V_AccVouch Where BookFlag=0 And Ccode like '" & Str_Ccode & "%' And CusCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  817.         " And Period<" & Int_BPeriod
  818.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  819.         If Not RecTemp.EOF Then
  820.             Dbl_Qcyete = Dbl_Qcyete + RecTemp.Fields("Jfjehj") - RecTemp.Fields("Dfjehj")
  821.             Dbl_Qcslte = Dbl_Qcslte + RecTemp.Fields("Jfslhj") - RecTemp.Fields("Dfslhj")
  822.             Dbl_Qcwbte = Dbl_Qcwbte + RecTemp.Fields("Wbjfjehj") - RecTemp.Fields("Wbdfjehj")
  823.             
  824.             '计算相应截止查询起始会计期间累计数据
  825.             Dbl_Jejflj = Dbl_Jejflj + RecTemp.Fields("Jfjehj")
  826.             Dbl_Jedflj = Dbl_Jedflj + RecTemp.Fields("Dfjehj")
  827.             Dbl_Sljflj = Dbl_Sljflj + RecTemp.Fields("Jfslhj")
  828.             Dbl_Sldflj = Dbl_Sldflj + RecTemp.Fields("Dfslhj")
  829.             Dbl_Wbjflj = Dbl_Wbjflj + RecTemp.Fields("Wbjfjehj")
  830.             Dbl_Wbdflj = Dbl_Wbdflj + RecTemp.Fields("Wbdfjehj")
  831.         End If
  832.     End If
  833.     
  834.     If (Dbl_Qcyete <> 0 Or (Bln_EndFlag And (Dbl_Qcslte <> 0 Or dnl_qcwbte <> 0))) Or Bln_QcZeroShow Then    '如果期初数据为零,且用户选择不输出则不显示此行数据
  835.         CxbbGrid.AddItem ""
  836.         Jsqte = Jsqte + 1
  837.         
  838.         '将期初数据写入网格(第1会计期间为上年结转,其余会计期间为期初余额)
  839.         If Int_BPeriod = 1 Then
  840.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "上年结转"
  841.         Else
  842.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "期初余额"
  843.         End If
  844.         
  845.         '输出余额
  846.         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  847.     End If
  848.     
  849.     '2.读取查询会计期间范围内所有符合条件明细帐数据(以年度+会计期间),并写入网格
  850.     Bln_NotFirst = False
  851.     
  852.     '筛选所有符合条件数据
  853.     Sqlstr = "SELECT *" & _
  854.     " From Cwzz_V_AccVouchAss Where Ccode like '" & Str_Ccode & "%' And CusCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  855.     " And Period>=" & Int_BPeriod & " And Period<=" & Int_EPeriod
  856.     If Not Bln_IncluNotBook Then
  857.         Sqlstr = Sqlstr & " And BookFlag=1"
  858.     End If
  859.     Sqlstr = Sqlstr & " Order By Year,Period,Ddate,VouchID,SerialID"
  860.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  861.     With RecTemp
  862.         Do While Not .EOF
  863.             If Bln_NotFirst Then
  864.                 '当前进行会计期间发生变化则添加本月合计及本年累计
  865.                 If .Fields("Period") <> Int_DqPeriod Then
  866.                     '显示本月合计
  867.                     If Lng_MonthCount <> 0 Then
  868.                         CxbbGrid.AddItem ""
  869.                         Jsqte = Jsqte + 1
  870.                         
  871.                         '输出本月合计
  872.                         Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  873.                         
  874.                         '输出余额
  875.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  876.                     End If
  877.                     
  878.                     '重新初始化本月合计数据
  879.                     Dbl_Jejfhj = 0
  880.                     Dbl_Jedfhj = 0
  881.                     Dbl_Sljfhj = 0
  882.                     Dbl_Sldfhj = 0
  883.                     Dbl_Wbjfhj = 0
  884.                     Dbl_Wbdfhj = 0
  885.                     
  886.                     Lng_MonthCount = 0
  887.                     
  888.                     '显示本年累计
  889.                     If Lng_YearCount <> 0 Then
  890.                         CxbbGrid.AddItem ""
  891.                         Jsqte = Jsqte + 1
  892.                         
  893.                         '输出本年累计
  894.                         Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  895.                         
  896.                         '输出余额
  897.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  898.                     End If
  899.                 End If        '显示本月合计,本年累计完毕
  900.             End If
  901.             Bln_NotFirst = True
  902.             
  903.             '显示明细数据
  904.             CxbbGrid.AddItem ""
  905.             Jsqte = Jsqte + 1
  906.             
  907.             '本月、本年记录计数器+1
  908.             Lng_MonthCount = Lng_MonthCount + 1
  909.             Lng_YearCount = Lng_YearCount + 1
  910.             
  911.             '未记帐明细分录变色显示
  912.             If .Fields("BookFlag") = 0 Then
  913.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  914.             End If
  915.             '修改当前会计期间
  916.             Int_DqPeriod = .Fields("Period")
  917.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("VouchId")              '凭证ID
  918.             If IsDate(.Fields("Ddate")) Then
  919.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = .Fields("Ddate")                    '日期
  920.             End If
  921.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") + "-" + Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4) '凭证字号
  922.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")           '摘要
  923.             
  924.             '部门
  925.             If Trim(.Fields("DeptName") & "") <> "" Then
  926.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("DeptName") & "")
  927.             End If
  928.             '个人
  929.             If Trim(.Fields("PersonName") & "") <> "" Then
  930.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("PersonName") & "")
  931.             End If
  932.             '项目
  933.             If Trim(.Fields("ItemName") & "") <> "" Then
  934.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("ItemName") & "")
  935.             End If
  936.             
  937.             If .Fields("Jfje") <> 0 Then                                                                       '借方金额
  938.                 CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = .Fields("Jfje")
  939.                 CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = .Fields("Jfje")
  940.             End If
  941.             If .Fields("Dfje") <> 0 Then                                                                       '贷方金额
  942.                 CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = .Fields("Dfje")
  943.                 CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = .Fields("Dfje")
  944.             End If
  945.             
  946.             '只有末级科目才显示数量和外币,数量不为零则计算单价
  947.             If Bln_EndFlag Then
  948.                 If .Fields("Jfsl") <> 0 Then                                                                    '借方数量
  949.                     CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = .Fields("Jfsl")
  950.                     If .Fields("Jfje") <> 0 Then
  951.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  952.                     Else
  953.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  954.                     End If
  955.                 End If
  956.                 If .Fields("Dfsl") <> 0 Then                                                                    '贷方数量
  957.                     CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = .Fields("Dfsl")
  958.                     If .Fields("Jfje") <> 0 Then
  959.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  960.                     Else
  961.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  962.                     End If
  963.                 End If
  964.             End If
  965.             If Bln_EndFlag And Bln_ForeignFlag Then
  966.                 If .Fields("Wbjfje") <> 0 Then                                                                  '借方外币
  967.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = .Fields("Wbjfje")
  968.                 End If
  969.                 If .Fields("Wbdfje") <> 0 Then                                                                  '贷方外币
  970.                     CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = .Fields("Wbdfje")
  971.                 End If
  972.                 If .Fields("AccRate") <> 0 Then                                                                 '记帐汇率
  973.                     CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Format(.Fields("AccRate"), "##." + String(Int_Wbhlxsws, "0"))
  974.                 End If
  975.             End If
  976.             
  977.             '累加本月合计,本年累计数据
  978.             Dbl_Jejfhj = Dbl_Jejfhj + .Fields("Jfje")
  979.             Dbl_Jedfhj = Dbl_Jedfhj + .Fields("Dfje")
  980.             Dbl_Sljfhj = Dbl_Sljfhj + .Fields("Jfsl")
  981.             Dbl_Sldfhj = Dbl_Sldfhj + .Fields("Dfsl")
  982.             Dbl_Wbjfhj = Dbl_Wbjfhj + .Fields("Wbjfje")
  983.             Dbl_Wbdfhj = Dbl_Wbdfhj + .Fields("Wbdfje")
  984.             
  985.             Dbl_Jejflj = Dbl_Jejflj + .Fields("Jfje")
  986.             Dbl_Jedflj = Dbl_Jedflj + .Fields("Dfje")
  987.             Dbl_Sljflj = Dbl_Sljflj + .Fields("Jfsl")
  988.             Dbl_Sldflj = Dbl_Sldflj + .Fields("Dfsl")
  989.             Dbl_Wbjflj = Dbl_Wbjflj + .Fields("Wbjfje")
  990.             Dbl_Wbdflj = Dbl_Wbdflj + .Fields("Wbdfje")
  991.             
  992.             '3.计算余额
  993.             Dbl_Qcyete = Dbl_Qcyete + .Fields("Jfje") - .Fields("Dfje")
  994.             Dbl_Qcslte = Dbl_Qcslte + .Fields("Jfsl") - .Fields("Dfsl")
  995.             Dbl_Qcwbte = Dbl_Qcwbte + .Fields("Wbjfje") - .Fields("Wbdfje")
  996.             
  997.             '输出余额
  998.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  999.             .MoveNext
  1000.         Loop
  1001.         '添加本月合计及本年累计
  1002.         If Bln_NotFirst Then
  1003.             If Lng_MonthCount <> 0 Then
  1004.                 CxbbGrid.AddItem ""
  1005.                 Jsqte = Jsqte + 1
  1006.                 '输出本月合计
  1007.                 Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  1008.                 
  1009.                 '输出余额
  1010.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1011.             End If
  1012.             '显示本年累计
  1013.             If Lng_YearCount <> 0 Then
  1014.                 CxbbGrid.AddItem ""
  1015.                 Jsqte = Jsqte + 1
  1016.                 
  1017.                 '输出本年累计
  1018.                 Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  1019.                 '输出余额
  1020.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1021.             End If
  1022.             
  1023.         End If
  1024.     End With
  1025.     '重置网格行高
  1026.     For Jsqte = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  1027.         CxbbGrid.RowHeight(Jsqte) = Sjhgd
  1028.     Next Jsqte
  1029. End Sub
  1030. Private Sub Combo_AccFormat_Click()                    '用户选择不同帐页格式
  1031.     Dim Int_Coljsq As Integer         '网格列临时计数器
  1032.     
  1033.     '为了加快显示速度
  1034.     CxbbGrid.Redraw = False
  1035.     
  1036.     For Int_Coljsq = Qslz To CxbbGrid.Cols - 1
  1037.         CxbbGrid.ColHidden(Int_Coljsq) = True
  1038.     Next Int_Coljsq
  1039.     Select Case Combo_AccFormat
  1040.     Case "金额式"
  1041.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1042.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1043.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1044.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '借方.借方
  1045.         CxbbGrid.ColHidden(Sydz("010", GridStr(), Szzls)) = False      '贷方.贷方
  1046.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1047.         CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '余额.余额
  1048.     Case "外币金额式"
  1049.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1050.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1051.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1052.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1053.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1054.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1055.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1056.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1057.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1058.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1059.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1060.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1061.     Case "数量金额式"
  1062.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1063.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1064.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1065.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1066.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1067.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1068.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1069.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1070.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1071.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1072.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1073.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1074.     Case "数量外币式"
  1075.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1076.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1077.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1078.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1079.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1080.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1081.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1082.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1083.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1084.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1085.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1086.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1087.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1088.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1089.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1090.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1091.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1092.     End Select
  1093.     CxbbGrid.Redraw = True
  1094. End Sub
  1095. Private Sub Sub_OutBalance(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#)          '输出余额
  1096.     If Dbl_Qcyete = 0 Then
  1097.         CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "平"          '期初方向
  1098.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1099.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1100.         End If
  1101.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1102.             CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1103.         End If
  1104.     Else
  1105.         If Dbl_Qcyete > 0 Then
  1106.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "借"
  1107.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Dbl_Qcyete
  1108.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Dbl_Qcyete
  1109.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1110.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1111.             End If
  1112.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1113.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1114.             End If
  1115.         Else
  1116.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "贷"
  1117.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = -Dbl_Qcyete
  1118.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = -Dbl_Qcyete
  1119.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1120.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = -Dbl_Qcslte
  1121.             End If
  1122.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1123.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = -Dbl_Qcwbte
  1124.             End If
  1125.         End If
  1126.         
  1127.         '输出单价
  1128.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1129.             CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcslte, "##." + String(Xtdjxsws, "0"))
  1130.         End If
  1131.         '输出外币汇率
  1132.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1133.             If Bln_ConVertFlag Then      '(外币/汇率=本位币)
  1134.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcwbte / Dbl_Qcyete, "##." + String(Int_Wbhlxsws, "0"))
  1135.             Else
  1136.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcwbte, "##." + String(Int_Wbhlxsws, "0"))
  1137.             End If
  1138.         End If
  1139.     End If
  1140. End Sub
  1141. Private Sub Sub_OutPeriodSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj#)  '输出本月合计
  1142.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1143.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本月合计"
  1144.     If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1145.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1146.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1147.     End If
  1148.     If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1149.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1150.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1151.     End If
  1152.     
  1153.     '只有末级科目才显示数量和外币
  1154.     If Bln_EndFlag Then
  1155.         If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1156.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1157.         End If
  1158.         If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1159.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1160.         End If
  1161.     End If
  1162.     
  1163.     If Bln_EndFlag And Bln_ForeignFlag Then
  1164.         If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1165.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1166.         End If
  1167.         If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1168.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1169.         End If
  1170.     End If
  1171. End Sub
  1172. Private Sub Sub_OutYearSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj#)  '输出本年累计
  1173.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1174.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本年累计"
  1175.     If Dbl_Jejflj <> 0 Then                                                        '本年借方金额累计
  1176.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejflj
  1177.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejflj
  1178.     End If
  1179.     If Dbl_Jedflj <> 0 Then                                                        '本年贷方金额累计
  1180.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedflj
  1181.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedflj
  1182.     End If
  1183.     
  1184.     '只有末级科目才显示数量和外币
  1185.     If Bln_EndFlag Then
  1186.         If Dbl_Sljflj <> 0 Then                                                     '本年借方数量累计
  1187.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljflj
  1188.         End If
  1189.         If Dbl_Sldflj <> 0 Then                                                     '本年贷方数量累计
  1190.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldflj
  1191.         End If
  1192.     End If
  1193.     If Bln_EndFlag And Bln_ForeignFlag Then
  1194.         If Dbl_Wbjflj <> 0 Then                                                     '本年借方外币累计
  1195.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjflj
  1196.         End If
  1197.         If Dbl_Wbdflj <> 0 Then                                                     '本年贷方外币累计
  1198.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdflj
  1199.         End If
  1200.     End If
  1201. End Sub
  1202. Private Sub CxbbGrid_DblClick()          '用户双击网格调入相应凭证
  1203.     Dim RecTemp As New ADODB.Recordset
  1204.     With CxbbGrid
  1205.         '非数据行退出
  1206.         If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1207.             Exit Sub
  1208.         End If
  1209.         If Trim(.TextMatrix(.Row, 0)) = "" Then
  1210.             Exit Sub
  1211.         End If
  1212.     End With
  1213.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  1214.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1215.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1216.     With RecTemp
  1217.         If .EOF Then
  1218.             Tsxx = "此凭证已被其他用户删除!"
  1219.             Call Xtxxts(Tsxx, 0, 4)
  1220.             Exit Sub
  1221.         Else
  1222.             With PZ_JzpzclFrm
  1223.                 '填充查询凭证标识
  1224.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1225.                 
  1226.                 '设置凭证处理为列表查询状态
  1227.                 .Lab_Pzclzt.Caption = "4"
  1228.                 .Show 1
  1229.             End With
  1230.         End If
  1231.     End With
  1232. End Sub
  1233. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1234.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1235.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1236.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1237.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1238.     ReDim Bbxbt(1 To Bbxbtgs)
  1239.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1240.     If Bbbwhgs <> 0 Then
  1241.         ReDim Bbbwh(1 To Bbbwhgs)
  1242.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1243.     End If
  1244.     Bbzbt = ReportTitle
  1245.     'Bbxbt(1) = Space(2) + "科目名称:" + Me.Lab_Ccode.Caption
  1246.     Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "客户:" + Me.Imgebo_FzCode.Text
  1247.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1248.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1249.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1250.     If Not bbylte Then
  1251.         Unload DY_Tybbyldy
  1252.     End If
  1253. End Sub
  1254. Private Sub Sub_Lxdy()                                 '帐页连续打印(帐页每批尽量少选)
  1255.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1256.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1257.     Dim Jsqte As Long
  1258.     Dim Lng_CurrentIndex As Long
  1259.     Dim YAnswer As Integer
  1260.     '用户确认是否开始连续打印帐页
  1261.     Tsxx = "请确认是否开始连续打印帐页?"
  1262.     YAnswer = Xtxxts(Tsxx, 2, 2)
  1263.     If YAnswer <> 1 Then
  1264.         Exit Sub
  1265.     End If
  1266.     
  1267.     
  1268.     '初始化连续打印状态
  1269.     Cmd_CancelPrint.Visible = True
  1270.     Cmd_CancelPrint.SetFocus
  1271.     Cmd_CancelPrint.Refresh
  1272.     Bln_CancelPrint = False
  1273.     Bln_Printing = True
  1274.     
  1275.     If Imgebo_FzCode.ComboItems.count = 0 Then GoTo Zero_Handle
  1276.     
  1277.     '循环输出打印作业
  1278.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  1279.         If Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte) Then
  1280.             Lng_CurrentIndex = Jsqte
  1281.         End If
  1282.     Next Jsqte
  1283.     For Jsqte = Lng_CurrentIndex To Imgebo_FzCode.ComboItems.count
  1284.         Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte)
  1285.         Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  1286.         Imgebo_FzCode.Refresh
  1287.         Call Imgebo_FzCode_Click
  1288.         Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1289.         Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1290.         ReDim Bbxbt(1 To Bbxbtgs)
  1291.         ReDim bbxbtzzxs(1 To Bbxbtgs)
  1292.         If Bbbwhgs <> 0 Then
  1293.             ReDim Bbbwh(1 To Bbbwhgs)
  1294.             ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1295.         End If
  1296.         Bbzbt = ReportTitle
  1297.         Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "客户:" + Me.Imgebo_FzCode.Text
  1298.         bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1299.         Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1300.         Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, False, True)
  1301.         Unload DY_Tybbyldy
  1302.         DoEvents
  1303.         If Bln_CancelPrint Then
  1304.             Bln_Printing = False
  1305.             Exit Sub
  1306.         End If
  1307.     Next Jsqte
  1308. Zero_Handle:
  1309.     
  1310.     Bln_Printing = False
  1311.     Cmd_CancelPrint.Visible = False
  1312. End Sub
  1313. Private Sub Cmd_CancelPrint_Click()                    '取消帐页连续打印
  1314.     Bln_CancelPrint = True
  1315.     Cmd_CancelPrint.Visible = False
  1316. End Sub