for Access |
| One of problematic areas of Access development is giving users a way to change the printer for an Access report when the report is sent to print without having to preview the report. Veteran Access developers have relied on "On the Fly Printing" to solve this problem. |
|
For all versions of Access you can add printer changing functionality by sending your reports to print using the following code from a command button on a form: returnval = SetPrint(MyForm.hwnd,"MyReport", True , 1, True) Dim Printer As New PrintClass
Dim Result as Boolean
With Printer
.ReportName = "Report1"
.Copies = 1 'Default setting; user can select copies
.FirstSpoolReport = True
.NoSaveChange = True
.PrintRpt 'Send it to print
End With
Result = Printer.PrintResult
|
| Download a demo database for: OTF for Access 97 OTF for Access 2000, 2002 (Xp) or 2003 See how easy it is to add this functionality to your app. Licenses are available at the following levels:
| |
|
| |