Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    1

    Unanswered: Printing reports from VB

    My Table/ field list:

    slno Name, age, sex, doj, referedby, phone, cell

    my output should be

    Slno : ________ System date Date :______
    name :_____ Age :______ Sex :______
    refered : __________ phone:______ Cell:______

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Perhaps you should use a reporting engine.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Or, for an apparently simple format as you describe...
    Pseudo Code
    Code:
    Declare, Instanciate, and Open an ADO connection
    Declare, Instanciate, and Open an ADO Recordset
    
    Iterate through the Recordset,
      Printer.Print Field(0), Field(1)
      Printer.Print Field(2), Field(3), Field(4)
      Printer.Print Field(5), Field(6), Field(7)  
      Printer.Print
    
    Printer.EndDoc
    Close and Release the ADO Recordset
    Close and Release the ADO Connection
    Ref this VB ADO Tutorial at a sister site.

    Note: The database field name Name is probably a reserved word in the database. I recommend that you use a different field name.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    or

    dim str as string

    str = Field(0) , Field(1) & vbcrlf Field(2) , Field(3), Field(4) & vbcrlf Field(5),Field(6)
    Printer.Print str

    'out put =
    Name , sex
    Street, city ,Country
    telephone, mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •