Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing popup not report 1

Status
Not open for further replies.

janetlyn

Technical User
Jan 29, 2003
516
US
I have a form "Reports" with thirty labels, each label contains a report. When one of the labels is selected it opens a popup "PUReports" and then the specific report. On the popup are two buttons. Print or Close. If they select print, it should print the report, close the report, close the popup and return to the "Reports" form. If they select close, it closes the popup and the report.

My problem is that when they select print, it is either (depending on my code) printing the popup itself, or the "Reports" form (like I did a print screen). I cannot get it to print the actual report that is opened. I have not yet, but in the end would like to take away all toolbars, buttons, etc. so only the report and popup is showing so they have to answer the popup only.

Here is the code I have so far:

Private Sub Label1_Click()

REM Close the popup
DoCmd.Close

REM Open Module that prints report
Call PrintReports

REM Open Module closing all reports
Call CloseOpenReports

REM Return to Reports Form
DoCmd.OpenForm "ReportsMenu", acNormal

REM Maximize reports form
DoCmd.Maximize

End Sub

MODULE (this module is the same as close reports except for the DoCmd line)

Sub PrintReports()
Dim rpt As Report
' Enumerate Open Reports in collection.
For Each rpt In Reports
DoCmd.PrintOut (acPrintAll)
Next rpt
End Sub

Any help or suggestions would be greatly appreciated.
Janet Lyn
 
ohhh, Seems like your database is kind of corrupted... Send it as it is in a zip file at this address : daniel.bordeleau@fti-ibis.com

I'll see what I can do

Deulyd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top