每输入一次记录后,打印当前记录,还有就是打印指定的记录,怎么编写备份ACCESS数据库,怎样关闭当前数据库,请提供代码!!谢谢

解决方案 »

  1.   

    用recordset指定记录,用printer对象写打印代码
      

  2.   

        '***********************************
        '1毫米=0.03937英寸
        '1英寸=1440提(twips)
        'A4纸=191毫米*210毫米
        '***********************************
        
        Printer.ScaleMode = vbTwips
        PrnUnit = 0.03937 * 1440 '设置最小打印单位    '单据日期
        Printer.CurrentX = (fHead_Left + 105) * PrnUnit
        Printer.CurrentY = (fHead_Top + 14) * PrnUnit
        Printer.Print Format(ar_PV!dVouchDate, "yyyy-mm-dd")
        '发票号码
         printer.CurrentX = (fHead_Left + 135) * PrnUnit
        Printer.CurrentY = (fHead_Top + 14) * PrnUnit
        Printer.Print "发票号码:"
        '客户名称
         Printer.CurrentX = (fHead_Left + 24) * PrnUnit
        Printer.CurrentY = (fHead_Top + 20) * PrnUnit
        Printer.Print Trim(txtcCusName.Text)
        '单据号码
         Printer.CurrentX = (fHead_Left + 135) * PrnUnit
        Printer.CurrentY = (fHead_Top + 20) * PrnUnit
        Printer.Print Right(Trim(VouchID), 8)
        '第几页/共几页
         Printer.CurrentX = (fHead_Left + 170) * PrnUnit
        Printer.CurrentY = (fHead_Top + 20) * PrnUnit
        Printer.Print "第" + Trim(Str(i_Page)) + "页/共" + Trim(Str(i_SumPages)) + "页"
      

  3.   

    www.skyrising.com 内有不少实例,自己看看