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

企业管理

开发平台:

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