Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing a record (VB6)

    Is there any way that you can easily (preferably!) print a single record from a 'Print' button? I would need, at least, the field headings too
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Printing a record (VB6)

    In the subject, you mention VB6, so I assume you are using the Visual Basic compiler.

    You write that you want to print a single record - a record of what? Is your VB program a frontend for an Access database, or ...?

  3. #3
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing a record (VB6)

    Sorry I wasn't very clear!
    The program is the front end for a SQL database - I just want to be able to print the currently displayed record

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Printing a record (VB6)

    I believe VB has a Print Form method. You could populate a userform with that record's data and print it that way. Or does it only print a graphic image?

    Maybe it would be better to generate a simple text document and print that using Notepad? On my system, the Print action for a TXT file is:

    C:WINDOWSsystem32NOTEPAD.EXE /p %1

    Perhaps there is a way to make this work without having to read the registry every time you want to print...

  5. #5
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing a record (VB6)

    Thanks - that will do it!
    Allison <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

Posting Permissions

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