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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Printing - Efficiency

Status
Not open for further replies.

eatwork

Technical User
May 16, 2005
155
CA
Hi everyone,
I was wondering if anyone knows if this method of printing is the most efficient way to print reports.
Code:
Forms!frmKeepopen.Form.chkIsFile = False
        
DoCmd.OpenReport "rptDispatch", acViewPreview, , rptWhereClause, acHidden
                
DoCmd.SelectObject acReport, "rptDispatch" ', False
                
DoCmd.PrintOut acPrintAll, , , acMedium, DCount("employeeId", "join_tbl_DispatchHist_EmployeeTruckTicket", rptWhereClause)
DoCmd.Close acReport, "rptDispatch"

Is there any way to print the report without opening it? it seems to take a long time for access to open the report before it prints it? thank you
 
Hi everyone,
I have stumbled onto some new code, but am having a problem filtering the report. This new way does not require me to open the report, but I am lost on how to filter the report to display only the reports the user has chosen. Any ideas would be greatly appreciated. Thank you

Code:
DoCmd.SelectObject acReport, "rptDispatch", True
Dim cnt As Integer
cnt = DCount("employeeId", "join_tbl_DispatchHist_EmployeeTruckTicket", rptWhereClause)
  If cnt >= 1 Then
     DoCmd.PrintOut acPrintAll, , acHigh, cnt  
  End If
DoCmd.Close acReport, "rptDispatch"
 
hi everyone,
still having this problem, and wondering if anyone out there knows if it is possible to filter a report with the Docmd.SelectObject method? Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top