Results 1 to 4 of 4

Thread: How do you print a string on the Printer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    28

    Post

    Hi how do you print a string on the printer.

    Lets say that I want to go through a data base printing the name field in Each record how would I do this.

    Thanks

    [This message has been edited by Stepeh (edited 02-14-2000).]

  2. #2
    Junior Member
    Join Date
    Jan 1999
    Location
    Yorkshire, UK
    Posts
    20

    Post

    Perhaps something like this...

    Private Sub CmdPrint_Click()
    ' This will print all of your record titles ' down the LHS of your paper.

    Dim intTotalTitles As Integer
    With Data1.Recordset

    For intTotalTitles = 0 To .RecordCount
    Printer.Print .Fields(0)
    .MoveNext
    Next
    End With
    Printer.EndDoc ' To Close the Printer after Printing
    End Sub

    You can set the print position by using

    Printer.CurrentX = <XValue>
    Printer.CurrentY = <YValue>

    To print a string just use Printer.Print "Your Message"

    I hope that gets you started.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    28

    Post

    Thanks Soo much that really Helps a lot

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    28

    Post

    Thanks Soo much that really Helps a lot

Posting Permissions

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



Click Here to Expand Forum to Full Width