CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2010
    Posts
    6

    VBA how to print a subForm/datasheet or export to a report to print?

    Hello,

    My problem is I have a mainForm with a combo box that acts as a filter for a subForm/datasheet, the results are from a database, so depending on what what was selected, it will dynamically update the subForm/datasheet.

    The issue I want is whatever the user selects (and results displayed) I wish to be able to 'print' out the results. The SubForm/datasheet has four columns, ID, FirstName, LastName, DateOfBirth.

    Now im unsure of the best way, i thought I might be able to create a button (on the mainForm) that just prints what is displayed in the subForm/datasheet or do i export it to a report, what is the easiest way to print out the results?

    With whatever method, what is the process and code? I have googled it for both methds, printing out the datasheet (doesn't seem like i can) or printing a report, i can't seem to manage it with the dynamic contents of the subForm/datasheet.

    Thanks in advance,

    Jac

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VBA how to print a subForm/datasheet or export to a report to print?

    Not an easy task. SQL 2012 Express has REPORTING SERVICE, but that won't help with VB6. Try VB.Net
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured