上传用户: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_Gr_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            =   8400
  37.          TabIndex        =   17
  38.          Top             =   120
  39.          Visible         =   0   'False
  40.          Width           =   1155
  41.       End
  42.       Begin VB.ComboBox Combo_AccFormat 
  43.          Height          =   300
  44.          Left            =   8970
  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           =   2745
  56.          _ExtentX        =   4842
  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            =   6000
  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            =   5070
  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            =   8520
  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            =   8220
  134.          TabIndex        =   8
  135.          Top             =   720
  136.          Width           =   195
  137.       End
  138.       Begin VB.Label Lab_TitleText 
  139.          BackStyle       =   0  'Transparent
  140.          ForeColor       =   &H00000000&
  141.          Height          =   225
  142.          Index           =   0
  143.          Left            =   6030
  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            =   8100
  154.          TabIndex        =   6
  155.          Top             =   1080
  156.          Width           =   915
  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            =   500
  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            =   5070
  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.             ImageIndex      =   36
  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             =   ""
  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_Gr_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.27
  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_gr_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_gr_slmxz"
  602.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  603.     
  604.     Qslz = GridInf(1)
  605.     Sjhgd = GridInf(2)
  606.     Sfxshjwg = GridInf(7)
  607.     Szzls = CxbbGrid.Cols - 1
  608.     
  609.     '帐页格式
  610.     Call FillCombo(Combo_AccFormat, "Cwzz_zygs", "", 0)
  611.     
  612.     '调整标题位置
  613.     SetTitlePos tsLabel(4)
  614.     
  615. End Sub
  616. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  617.     '如果正在执行连续打印,则不能退出窗体
  618.     If Bln_Printing Then
  619.         Cancel = 1
  620.     End If
  621.     '卸载条件窗体
  622.     ZF_Gr_Frmslmxztj.UnloadCheck.Value = 1
  623.     Unload ZF_Gr_Frmslmxztj
  624.     '卸载打印页面设置窗体
  625.     Unload Dyymctbl
  626. End Sub
  627. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  628.     Select Case Button.Key
  629.     Case "bcgs"                                          '保存表格格式
  630.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  631.     Case "hfmrgs"                                        '恢复默认格式
  632.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  633.     Case "szxsxm"                                        '设置显示项目
  634.         Call Szxsxm(CxbbGrid, GridCode)
  635.     End Select
  636. End Sub
  637. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  638.     '如果正在执行连续打印,则不能执行其他功能
  639.     If Bln_Printing Then
  640.         Exit Sub
  641.     End If
  642.     Select Case Button.Key
  643.     Case "ymsz"                                          '页面设置
  644.         Dyymctbl.Show 1
  645.     Case "yl"                                            '预 览
  646.         Call bbyl(True)
  647.     Case "dy"                                            '打 印
  648.         Call bbyl(False)
  649.     Case "lxdy"                                          '连续打印
  650.         Call Sub_Lxdy
  651.     Case "cx"                                            '查 询
  652.         ZF_Gr_Frmslmxztj.Show 1
  653.     Case "pz"                                            '凭 证
  654.         Call CxbbGrid_DblClick
  655.     Case "bz"                                            '帮 助
  656.         Call F1bz
  657.     Case "fh"                                            '退 出
  658.         Unload Me
  659.     End Select
  660. End Sub
  661. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  662.     Timer1.Enabled = False
  663.     
  664.     '查询个人
  665.     Call FillImageCombo(Imgebo_FzCode, "Cwzz_person", 0)
  666.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  667.         If Imgebo_FzCode.ComboItems.Item(Jsqte).Key = "@" + Trim(ZF_Gr_Frmslmxztj.LrText(0).Tag) Then
  668.             Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  669.             Imgebo_FzCode.Refresh
  670.             Exit For
  671.         End If
  672.     Next Jsqte
  673.     Call Imgebo_FzCode_Click
  674. End Sub
  675. Private Sub Imgebo_FzCode_Click()
  676.     Timer1.Enabled = False
  677.     Xt_Wait.Show
  678.     Xt_Wait.Refresh
  679.     
  680.     '加快显示速度
  681.     CxbbGrid.Redraw = False
  682.     
  683.     '生成查询结果
  684.     Call Sub_Query
  685.     CxbbGrid.Redraw = True
  686.     Xt_Wait.Hide
  687. End Sub
  688. Private Sub Sub_Query()                                    '生成查询结果
  689.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  690.     Dim Sqlstr As String                        '查询字符串
  691.     Dim Coljsq As Long                          '网格列计数器
  692.     Dim Jsqte As Long                           '临时动态计数器
  693.     Dim Str_Ccode As String                     '查询会计科目
  694.     Dim Str_FzCode As String                    '查询辅助个人编码
  695.     Dim Int_BPeriod As Integer                  '查询起始会计期间
  696.     Dim Int_EPeriod As Integer                  '查询终止会计期间
  697.     Dim Int_Year As Integer                     '查询会计年度
  698.     Dim Bln_IncluNotBook As Boolean             '是否包含未记帐凭证
  699.     Dim Bln_QcZeroShow As Boolean               '查询会计期间期初数据如果为零是否显示
  700.     Dim Bln_CqGcShow As Boolean                 '是否显示承前过次
  701.     Dim Int_Zdzyhs As Integer                   '正式帐页指定报表行数
  702.     Dim Bln_EndFlag As Boolean                  '判断当前科目是否为末级科目
  703.     Dim Int_DqPeriod As Integer                 '查询进行当前会计期间
  704.     Dim Bln_NotFirst As Boolean                 '是否为首次循环
  705.     Dim Bln_ForeignFlag As Boolean              '判断此科目是否外币核算
  706.     
  707.     Dim Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#   '期初金额,数量,外币
  708.     Dim Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj# '本期合计(金额,数量,外币)
  709.     Dim Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj# '截止累计(金额,数量,外币)
  710.     Dim Dbl_Qmyete#, Dbl_Qmslte#, Dbl_Qmwbte#   '期末金额,数量,外币
  711.     '以下为用户自定义部分[
  712.     
  713.     '清除原查询数据
  714.     CxbbGrid.Rows = CxbbGrid.FixedRows
  715.     With ZF_Gr_Frmslmxztj
  716.         '得到当前查询科目,并判断是否为末级科目
  717.         Lab_Ccode.Caption = .Imgebo_FzCcode.Text
  718.         Str_Ccode = GetComboKey(.Imgebo_FzCcode, 0)
  719.         Sqlstr = "SELECT EndFlag,AccFormat,ForeignFlag,ForeignCurrName,ConVertFlag From Cwzz_AccCode Left JOIN Gy_ForeignCurrency ON" & _
  720.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode Where Ccode='" & Str_Ccode & "'"
  721.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  722.         If Not RecTemp.EOF Then
  723.             Bln_EndFlag = RecTemp.Fields("EndFlag")
  724.             Combo_AccFormat.Text = Trim(RecTemp.Fields("AccFormat") & "")
  725.             If RecTemp.Fields("ForeignFlag") Then
  726.                 Bln_ForeignFlag = True
  727.                 Lab_TitleMess(2).Visible = True
  728.                 Lab_TitleText(1).Caption = Trim(RecTemp.Fields("ForeignCurrName") & "")
  729.                 Bln_ConVertFlag = IIf(IsNull(RecTemp.Fields("ConVertFlag")), False, RecTemp.Fields("ConVertFlag"))
  730.             Else
  731.                 Bln_ForeignFlag = False
  732.                 Lab_TitleMess(2).Visible = False
  733.                 Lab_TitleText(1).Caption = ""
  734.             End If
  735.         End If
  736.         
  737.         '外币汇率小数位数(将来可变)
  738.         Int_Wbhlxsws = 4
  739.         
  740.         '得到查询辅助个人编码
  741.         Str_FzCode = GetComboKey(Imgebo_FzCode, 0)
  742.         
  743.         '得到查询起始和截止会计期间,并判断是否包含未记帐凭证
  744.         Int_Year = Int(Mid(.Combo_Kjqj(0).Text, 1, 4))
  745.         Int_BPeriod = Int(Mid(.Combo_Kjqj(0).Text, 6, 2))
  746.         Int_EPeriod = Int(Mid(.Combo_Kjqj(1).Text, 6, 2))
  747.         Lab_TitleText(0).Caption = .Combo_Kjqj(0).Text & "--" & .Combo_Kjqj(1).Text
  748.         
  749.         '是否包含未记帐凭证
  750.         If .Chk_NotBook.Value = 1 Then
  751.             Bln_IncluNotBook = True
  752.         Else
  753.             Bln_IncluNotBook = False
  754.         End If
  755.         
  756.         '查询会计期间期初数据如果为零是否显示
  757.         If .Chk_QcZeroShow = 1 Then
  758.             Bln_QcZeroShow = True
  759.         Else
  760.             Bln_QcZeroShow = False
  761.         End If
  762.     End With
  763.     
  764.     '初始化各种值
  765.     Dbl_Qcyete = 0
  766.     Dbl_Qcslte = 0
  767.     Dbl_Qcwbte = 0
  768.     
  769.     Dbl_Jejfhj = 0
  770.     Dbl_Jedfhj = 0
  771.     Dbl_Sljfhj = 0
  772.     Dbl_Sldfhj = 0
  773.     Dbl_Wbjfhj = 0
  774.     Dbl_Wbdfhj = 0
  775.     
  776.     Dbl_Jejflj = 0
  777.     Dbl_Jedflj = 0
  778.     Dbl_Sljflj = 0
  779.     Dbl_Sldflj = 0
  780.     Dbl_Wbjflj = 0
  781.     Dbl_Wbdflj = 0
  782.     
  783.     Jsqte = CxbbGrid.FixedRows - 1
  784.     
  785.     '1.计算期初余额(金额,数量,外币),并计算截止查询起始会计期间累计数据
  786.     Sqlstr = "SELECT Qcyehj=Isnull(Sum(Qcye),0),Qcslhj=Isnull(Sum(Qcsl),0),Qcwbhj=Isnull(Sum(Qcwb),0), " & _
  787.     " Byjfljjehj=Isnull(Sum(Byjfljje-Mjje),0),Bydfljjehj=Isnull(Sum(Bydfljje-Mdje),0),Byjfljslhj=Isnull(Sum(Byjfljsl-Mjsl),0)," & _
  788.     " Bydfljslhj=Isnull(Sum(Bydfljsl-Mdsl),0),Byjfljwbhj=Isnull(Sum(Byjfljwb-Mjwb),0),Bydfljwbhj=Isnull(Sum(Bydfljwb-Mdwb),0) " & _
  789.     " From Cwzz_AccSumassi Where Ccode like '" & Str_Ccode & "%' And PersonCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  790.     " And Period=" & Int_BPeriod
  791.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  792.     If Not RecTemp.EOF Then
  793.         Dbl_Qcyete = RecTemp.Fields("Qcyehj")
  794.         Dbl_Qcslte = RecTemp.Fields("Qcslhj")
  795.         Dbl_Qcwbte = RecTemp.Fields("Qcwbhj")
  796.         
  797.         '截止累计数据需要减掉本会计期间相应记帐数据
  798.         Dbl_Jejflj = RecTemp.Fields("Byjfljjehj")
  799.         Dbl_Jedflj = RecTemp.Fields("Bydfljjehj")
  800.         Dbl_Sljflj = RecTemp.Fields("Byjfljslhj")
  801.         Dbl_Sldflj = RecTemp.Fields("Bydfljslhj")
  802.         Dbl_Wbjflj = RecTemp.Fields("Byjfljwbhj")
  803.         Dbl_Wbdflj = RecTemp.Fields("Bydfljwbhj")
  804.     End If
  805.     
  806.     '如果包含未记帐凭证则计算小于查询起始会计期间包含科目借贷方合计
  807.     If Bln_IncluNotBook Then
  808.         Sqlstr = "SELECT Jfjehj=Isnull(Sum(Jfje),0),Dfjehj=Isnull(Sum(Dfje),0),Jfslhj=Isnull(Sum(Jfsl),0),Dfslhj=Isnull(Sum(Dfsl),0) " & _
  809.         ",Wbjfjehj=Isnull(Sum(Wbjfje),0),Wbdfjehj=Isnull(Sum(Wbdfje),0) From Cwzz_V_AccVouch Where BookFlag=0 And Ccode like '" & Str_Ccode & "%' And PersonCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  810.         " And Period<" & Int_BPeriod
  811.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  812.         If Not RecTemp.EOF Then
  813.             Dbl_Qcyete = Dbl_Qcyete + RecTemp.Fields("Jfjehj") - RecTemp.Fields("Dfjehj")
  814.             Dbl_Qcslte = Dbl_Qcslte + RecTemp.Fields("Jfslhj") - RecTemp.Fields("Dfslhj")
  815.             Dbl_Qcwbte = Dbl_Qcwbte + RecTemp.Fields("Wbjfjehj") - RecTemp.Fields("Wbdfjehj")
  816.             
  817.             '计算相应截止查询起始会计期间累计数据
  818.             Dbl_Jejflj = Dbl_Jejflj + RecTemp.Fields("Jfjehj")
  819.             Dbl_Jedflj = Dbl_Jedflj + RecTemp.Fields("Dfjehj")
  820.             Dbl_Sljflj = Dbl_Sljflj + RecTemp.Fields("Jfslhj")
  821.             Dbl_Sldflj = Dbl_Sldflj + RecTemp.Fields("Dfslhj")
  822.             Dbl_Wbjflj = Dbl_Wbjflj + RecTemp.Fields("Wbjfjehj")
  823.             Dbl_Wbdflj = Dbl_Wbdflj + RecTemp.Fields("Wbdfjehj")
  824.         End If
  825.     End If
  826.     If (Dbl_Qcyete <> 0 Or (Bln_EndFlag And (Dbl_Qcslte <> 0 Or dnl_qcwbte <> 0))) Or Bln_QcZeroShow Then    '如果期初数据为零,且用户选择不输出则不显示此行数据
  827.         CxbbGrid.AddItem ""
  828.         Jsqte = Jsqte + 1
  829.         
  830.         '将期初数据写入网格(第1会计期间为上年结转,其余会计期间为期初余额)
  831.         If Int_BPeriod = 1 Then
  832.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "上年结转"
  833.         Else
  834.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "期初余额"
  835.         End If
  836.         
  837.         '输出余额
  838.         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  839.     End If
  840.     '2.读取查询会计期间范围内所有符合条件明细帐数据(以年度+会计期间),并写入网格
  841.     
  842.     Bln_NotFirst = False
  843.     
  844.     '筛选所有符合条件数据
  845.     Sqlstr = "SELECT *" & _
  846.     " From Cwzz_V_AccVouchAss Where Ccode like '" & Str_Ccode & "%' And PersonCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  847.     " And Period>=" & Int_BPeriod & " And Period<=" & Int_EPeriod
  848.     If Not Bln_IncluNotBook Then
  849.         Sqlstr = Sqlstr & " And BookFlag=1"
  850.     End If
  851.     Sqlstr = Sqlstr & " Order By Year,Period,Ddate,VouchID,SerialID"
  852.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  853.     With RecTemp
  854.         Do While Not .EOF
  855.             If Bln_NotFirst Then
  856.                 '当前进行会计期间发生变化则添加本月合计及本年累计
  857.                 If .Fields("Period") <> Int_DqPeriod Then
  858.                     '显示本月合计
  859.                     If Dbl_Jejfhj <> 0 Or Dbl_Jedfhj <> 0 Or (Bln_EndFlag And (Dbl_Sljfhj <> 0 Or Dbl_Sldfhj <> 0 Or Dbl_Wbjfhj <> 0 Or Dbl_Wbdfhj <> 0)) Then
  860.                         CxbbGrid.AddItem ""
  861.                         Jsqte = Jsqte + 1
  862.                         
  863.                         '输出本月合计
  864.                         Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  865.                         
  866.                         '输出余额
  867.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  868.                     End If
  869.                     
  870.                     '重新初始化本月合计数据
  871.                     Dbl_Jejfhj = 0
  872.                     Dbl_Jedfhj = 0
  873.                     Dbl_Sljfhj = 0
  874.                     Dbl_Sldfhj = 0
  875.                     Dbl_Wbjfhj = 0
  876.                     Dbl_Wbdfhj = 0
  877.                     
  878.                     '显示本年累计
  879.                     If Dbl_Jejflj <> 0 Or Dbl_Jedflj <> 0 Or (Bln_EndFlag And (Dbl_Sljflj <> 0 Or Dbl_Sldflj <> 0 Or Dbl_Wbjflj <> 0 Or Dbl_Wbdflj <> 0)) Then
  880.                         CxbbGrid.AddItem ""
  881.                         Jsqte = Jsqte + 1
  882.                         
  883.                         '输出本年累计
  884.                         Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  885.                         
  886.                         '输出余额
  887.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  888.                     End If
  889.                 End If        '显示本月合计,本年累计完毕
  890.             End If
  891.             Bln_NotFirst = True
  892.             
  893.             '显示明细数据
  894.             CxbbGrid.AddItem ""
  895.             Jsqte = Jsqte + 1
  896.             
  897.             '未记帐明细分录变色显示
  898.             If .Fields("BookFlag") = 0 Then
  899.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  900.             End If
  901.             
  902.             '修改当前会计期间
  903.             Int_DqPeriod = .Fields("Period")
  904.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("VouchId")              '凭证ID
  905.             If IsDate(.Fields("Ddate")) Then
  906.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = .Fields("Ddate")                    '日期
  907.             End If
  908.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") + "-" + Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4) '凭证字号
  909.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")           '摘要
  910.             
  911.             '客户
  912.             If Trim(.Fields("CusName") & "") <> "" Then
  913.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("CusName") & "")
  914.             End If
  915.             '项目
  916.             If Trim(.Fields("ItemName") & "") <> "" Then
  917.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("ItemName") & "")
  918.             End If
  919.             
  920.             If .Fields("Jfje") <> 0 Then                                                                       '借方金额
  921.                 CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = .Fields("Jfje")
  922.                 CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = .Fields("Jfje")
  923.             End If
  924.             If .Fields("Dfje") <> 0 Then                                                                       '贷方金额
  925.                 CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = .Fields("Dfje")
  926.                 CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = .Fields("Dfje")
  927.             End If
  928.             
  929.             '只有末级科目才显示数量和外币,数量不为零则计算单价
  930.             If Bln_EndFlag Then
  931.                 If .Fields("Jfsl") <> 0 Then                                                                    '借方数量
  932.                     CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = .Fields("Jfsl")
  933.                     If .Fields("Jfje") <> 0 Then
  934.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  935.                     Else
  936.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  937.                     End If
  938.                 End If
  939.                 If .Fields("Dfsl") <> 0 Then                                                                    '贷方数量
  940.                     CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = .Fields("Dfsl")
  941.                     If .Fields("Jfje") <> 0 Then
  942.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  943.                     Else
  944.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  945.                     End If
  946.                 End If
  947.             End If
  948.             If Bln_EndFlag And Bln_ForeignFlag Then
  949.                 If .Fields("Wbjfje") <> 0 Then                                                                  '借方外币
  950.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = .Fields("Wbjfje")
  951.                 End If
  952.                 If .Fields("Wbdfje") <> 0 Then                                                                  '贷方外币
  953.                     CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = .Fields("Wbdfje")
  954.                 End If
  955.                 If .Fields("AccRate") <> 0 Then                                                                 '记帐汇率
  956.                     CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Format(.Fields("AccRate"), "##." + String(Int_Wbhlxsws, "0"))
  957.                 End If
  958.             End If
  959.             '累加本月合计,本年累计数据
  960.             Dbl_Jejfhj = Dbl_Jejfhj + .Fields("Jfje")
  961.             Dbl_Jedfhj = Dbl_Jedfhj + .Fields("Dfje")
  962.             Dbl_Sljfhj = Dbl_Sljfhj + .Fields("Jfsl")
  963.             Dbl_Sldfhj = Dbl_Sldfhj + .Fields("Dfsl")
  964.             Dbl_Wbjfhj = Dbl_Wbjfhj + .Fields("Wbjfje")
  965.             Dbl_Wbdfhj = Dbl_Wbdfhj + .Fields("Wbdfje")
  966.             
  967.             Dbl_Jejflj = Dbl_Jejflj + .Fields("Jfje")
  968.             Dbl_Jedflj = Dbl_Jedflj + .Fields("Dfje")
  969.             Dbl_Sljflj = Dbl_Sljflj + .Fields("Jfsl")
  970.             Dbl_Sldflj = Dbl_Sldflj + .Fields("Dfsl")
  971.             Dbl_Wbjflj = Dbl_Wbjflj + .Fields("Wbjfje")
  972.             Dbl_Wbdflj = Dbl_Wbdflj + .Fields("Wbdfje")
  973.             '3.计算余额
  974.             Dbl_Qcyete = Dbl_Qcyete + .Fields("Jfje") - .Fields("Dfje")
  975.             Dbl_Qcslte = Dbl_Qcslte + .Fields("Jfsl") - .Fields("Dfsl")
  976.             Dbl_Qcwbte = Dbl_Qcwbte + .Fields("Wbjfje") - .Fields("Wbdfje")
  977.             
  978.             '输出余额
  979.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  980.             .MoveNext
  981.         Loop
  982.         '添加本月合计及本年累计
  983.         If Bln_NotFirst Then
  984.             If Dbl_Jejfhj <> 0 Or Dbl_Jedfhj <> 0 Or (Bln_EndFlag And (Dbl_Sljfhj <> 0 Or Dbl_Sldfhj <> 0 Or Dbl_Wbjfhj <> 0 Or Dbl_Wbdfhj <> 0)) Then
  985.                 CxbbGrid.AddItem ""
  986.                 Jsqte = Jsqte + 1
  987.                 
  988.                 '输出本月合计
  989.                 Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  990.                 
  991.                 '输出余额
  992.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  993.             End If
  994.             
  995.             '显示本年累计
  996.             If Dbl_Jejflj <> 0 Or Dbl_Jedflj <> 0 Or (Bln_EndFlag And (Dbl_Sljflj <> 0 Or Dbl_Sldflj <> 0 Or Dbl_Wbjflj <> 0 Or Dbl_Wbdflj <> 0)) Then
  997.                 CxbbGrid.AddItem ""
  998.                 Jsqte = Jsqte + 1
  999.                 
  1000.                 '输出本年累计
  1001.                 Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  1002.                 
  1003.                 '输出余额
  1004.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1005.             End If
  1006.             
  1007.             '如果会计期间为第12会计期间则输出结转下年
  1008.             If Int_DqPeriod = 12 Then
  1009.                 CxbbGrid.AddItem ""
  1010.                 Jsqte = Jsqte + 1
  1011.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "结转下年"
  1012.                 '输出余额
  1013.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1014.             End If
  1015.         End If
  1016.     End With
  1017.     '重置网格行高
  1018.     For Jsqte = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  1019.         CxbbGrid.RowHeight(Jsqte) = Sjhgd
  1020.     Next Jsqte
  1021. End Sub
  1022. Private Sub Combo_AccFormat_Click()                    '用户选择不同帐页格式
  1023.     Dim Int_Coljsq As Integer         '网格列临时计数器
  1024.     
  1025.     '为了加快显示速度
  1026.     CxbbGrid.Redraw = False
  1027.     For Int_Coljsq = Qslz To CxbbGrid.Cols - 1
  1028.         CxbbGrid.ColHidden(Int_Coljsq) = True
  1029.     Next Int_Coljsq
  1030.     Select Case Combo_AccFormat
  1031.     Case "金额式"
  1032.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1033.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1034.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1035.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '借方.借方
  1036.         CxbbGrid.ColHidden(Sydz("010", GridStr(), Szzls)) = False      '贷方.贷方
  1037.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1038.         CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '余额.余额
  1039.     Case "外币金额式"
  1040.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1041.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1042.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1043.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1044.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1045.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1046.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1047.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1048.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1049.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1050.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1051.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1052.     Case "数量金额式"
  1053.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1054.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1055.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1056.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1057.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1058.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1059.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1060.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1061.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1062.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1063.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1064.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1065.     Case "数量外币式"
  1066.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1067.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1068.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1069.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1070.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1071.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1072.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1073.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1074.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1075.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1076.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1077.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1078.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1079.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1080.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1081.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1082.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1083.     End Select
  1084.     CxbbGrid.Redraw = True
  1085. End Sub
  1086. Private Sub Sub_OutBalance(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#)          '输出余额
  1087.     If Dbl_Qcyete = 0 Then
  1088.         CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "平"          '期初方向
  1089.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1090.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1091.         End If
  1092.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1093.             CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1094.         End If
  1095.     Else
  1096.         If Dbl_Qcyete > 0 Then
  1097.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "借"
  1098.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Dbl_Qcyete
  1099.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Dbl_Qcyete
  1100.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1101.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1102.             End If
  1103.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1104.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1105.             End If
  1106.         Else
  1107.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "贷"
  1108.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = -Dbl_Qcyete
  1109.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = -Dbl_Qcyete
  1110.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1111.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = -Dbl_Qcslte
  1112.             End If
  1113.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1114.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = -Dbl_Qcwbte
  1115.             End If
  1116.         End If
  1117.         
  1118.         '输出单价
  1119.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1120.             CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcslte, "##." + String(Xtdjxsws, "0"))
  1121.         End If
  1122.         '输出外币汇率
  1123.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1124.             If Bln_ConVertFlag Then      '(外币/汇率=本位币)
  1125.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcwbte / Dbl_Qcyete, "##." + String(Int_Wbhlxsws, "0"))
  1126.             Else
  1127.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcwbte, "##." + String(Int_Wbhlxsws, "0"))
  1128.             End If
  1129.         End If
  1130.     End If
  1131. End Sub
  1132. 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#)  '输出本月合计
  1133.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1134.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本月合计"
  1135.     If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1136.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1137.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1138.     End If
  1139.     If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1140.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1141.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1142.     End If
  1143.     
  1144.     '只有末级科目才显示数量和外币
  1145.     If Bln_EndFlag Then
  1146.         If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1147.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1148.         End If
  1149.         If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1150.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1151.         End If
  1152.     End If
  1153.     
  1154.     If Bln_EndFlag And Bln_ForeignFlag Then
  1155.         If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1156.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1157.         End If
  1158.         If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1159.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1160.         End If
  1161.     End If
  1162. End Sub
  1163. 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#)  '输出本年累计
  1164.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1165.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本年累计"
  1166.     If Dbl_Jejflj <> 0 Then                                                        '本年借方金额累计
  1167.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejflj
  1168.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejflj
  1169.     End If
  1170.     If Dbl_Jedflj <> 0 Then                                                        '本年贷方金额累计
  1171.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedflj
  1172.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedflj
  1173.     End If
  1174.     
  1175.     '只有末级科目才显示数量和外币
  1176.     If Bln_EndFlag Then
  1177.         If Dbl_Sljflj <> 0 Then                                                     '本年借方数量累计
  1178.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljflj
  1179.         End If
  1180.         If Dbl_Sldflj <> 0 Then                                                     '本年贷方数量累计
  1181.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldflj
  1182.         End If
  1183.     End If
  1184.     If Bln_EndFlag And Bln_ForeignFlag Then
  1185.         If Dbl_Wbjflj <> 0 Then                                                     '本年借方外币累计
  1186.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjflj
  1187.         End If
  1188.         If Dbl_Wbdflj <> 0 Then                                                     '本年贷方外币累计
  1189.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdflj
  1190.         End If
  1191.     End If
  1192. End Sub
  1193. Private Sub CxbbGrid_DblClick()          '用户双击网格调入相应凭证
  1194.     Dim RecTemp As New ADODB.Recordset
  1195.     
  1196.     With CxbbGrid
  1197.         '非数据行退出
  1198.         If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1199.             Exit Sub
  1200.         End If
  1201.         If Trim(.TextMatrix(.Row, 0)) = "" Then
  1202.             Exit Sub
  1203.         End If
  1204.     End With
  1205.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  1206.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1207.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1208.     With RecTemp
  1209.         If .EOF Then
  1210.             Tsxx = "此凭证已被其他用户删除!"
  1211.             Call Xtxxts(Tsxx, 0, 4)
  1212.             Exit Sub
  1213.         Else
  1214.             With PZ_JzpzclFrm
  1215.                 '填充查询凭证标识
  1216.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1217.                 
  1218.                 '设置凭证处理为列表查询状态
  1219.                 .Lab_Pzclzt.Caption = "4"
  1220.                 .Show 1
  1221.             End With
  1222.         End If
  1223.     End With
  1224. End Sub
  1225. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1226.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1227.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1228.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1229.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1230.     ReDim Bbxbt(1 To Bbxbtgs)
  1231.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1232.     If Bbbwhgs <> 0 Then
  1233.         ReDim Bbbwh(1 To Bbbwhgs)
  1234.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1235.     End If
  1236.     Bbzbt = ReportTitle
  1237.     'Bbxbt(1) = Space(2) + "科目名称:" + Me.Lab_Ccode.Caption
  1238.     Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "姓名:" + Me.Imgebo_FzCode.Text
  1239.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1240.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1241.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1242.     If Not bbylte Then
  1243.         Unload DY_Tybbyldy
  1244.     End If
  1245. End Sub
  1246. Private Sub Sub_Lxdy()                                 '帐页连续打印
  1247.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1248.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1249.     Dim Jsqte As Long
  1250.     Dim Lng_CurrentIndex As Long
  1251.     Dim YAnswer As Integer
  1252.     '用户确认是否开始连续打印帐页
  1253.     Tsxx = "请确认是否开始连续打印帐页?"
  1254.     YAnswer = Xtxxts(Tsxx, 2, 2)
  1255.     If YAnswer <> 1 Then
  1256.         Exit Sub
  1257.     End If
  1258.     '初始化连续打印状态
  1259.     Cmd_CancelPrint.Visible = True
  1260.     Cmd_CancelPrint.SetFocus
  1261.     Cmd_CancelPrint.Refresh
  1262.     Bln_CancelPrint = False
  1263.     Bln_Printing = True
  1264.     '循环输出打印作业
  1265.     
  1266.     If Imgebo_FzCode.ComboItems.count = 0 Then GoTo Zero_Handle
  1267.     
  1268.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  1269.         If Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte) Then
  1270.             Lng_CurrentIndex = Jsqte
  1271.         End If
  1272.     Next Jsqte
  1273.     For Jsqte = Lng_CurrentIndex To Imgebo_FzCode.ComboItems.count
  1274.         Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte)
  1275.         Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  1276.         Imgebo_FzCode.Refresh
  1277.         Call Imgebo_FzCode_Click
  1278.         Bbxbtgs = 1                                          '报表小标题行数
  1279.         Bbbwhgs = 0                                          '报表表尾行数
  1280.         ReDim Bbxbt(1 To Bbxbtgs)
  1281.         ReDim bbxbtzzxs(1 To Bbxbtgs)
  1282.         If Bbbwhgs <> 0 Then
  1283.             ReDim Bbbwh(1 To Bbbwhgs)
  1284.             ReDim Bbbwhzzxs(I To Bbbwhgs)
  1285.         End If
  1286.         Bbzbt = ReportTitle
  1287.         Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "往来个人:" + Me.Imgebo_FzCode.Text
  1288.         bbxbtzzxs(1) = 1                                      '报表行组织形式(0-居左 1-居中 2-居右)
  1289.         Call Scyxsjb(CxbbGrid)                                '生成报表数据
  1290.         Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, False, True)
  1291.         Unload DY_Tybbyldy
  1292.         DoEvents
  1293.         If Bln_CancelPrint Then
  1294.             Bln_Printing = False
  1295.             Exit Sub
  1296.         End If
  1297.     Next Jsqte
  1298.     
  1299. Zero_Handle:
  1300.     Bln_Printing = False
  1301.     Cmd_CancelPrint.Visible = False
  1302. End Sub
  1303. Private Sub Cmd_CancelPrint_Click()                    '取消帐页连续打印
  1304.     Bln_CancelPrint = True
  1305.     Cmd_CancelPrint.Visible = False
  1306. End Sub