December 2nd, 2012, 10:29 PM
VBA how to print a subForm/datasheet or export to a report to print?
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,
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!