Excel
(1)
DoCmd.Printout
(1)
Report
(1)
AcPageRange
(1)
Mspreadsheet
(1)
Macroname
(1)
Sepaate
(1)
Spooler
(1)

Print Access report along with an outside checklist

Asked By Gabby Girl
20-Mar-10 02:28 PM
Good afternoon

Is it possible to print a report that is in Access and then right after print
an Excel checklist?

Background:

I work for a large construction company that does regular maintenance on
their equipment.  Right now we print a parts ticket of the parts required for
the particular service they are doing & then we print a copy of the
manufacturer's check list of what should be done (which is an excel
document).  They would like to automate this procedure so that when you print
the parts ticket it will automatically print the required manufacturer's
check list.  I have added a field to the parts ticket that holds the path &
name of the related checklist but am now stuck on the code to print both at
the same.  Is this even possible?

Any advice is greatly appreciated.

Thanks

Hi Gabby,You can use the Shell command to open the spreadsheet, run a macro

bhicks11 via AccessMonster.com replied to Gabby Girl
22-Mar-10 07:25 PM
Hi Gabby,

You can use the Shell command to open the spreadsheet, run a macro that
prints it and exits the program (create the macro first).  Here is a sample:

Dim mspreadsheet
Dim macroname

mspreadsheet = "C:\spreadsheet.xls"
macroname = something

Shell ("excel.exe" & " " & mspreadsheet & macroname)

Bonnie
http://www.dataplus-svc.com


--
Message posted via http://www.accessmonster.com

Bonnie,Cool idea, but let me ask this question.

Dennis replied to bhicks11 via AccessMonster.com
22-Mar-10 11:10 PM
Bonnie,

Cool idea, but let me ask this question.

As I understand this solution, the Excel printout will be a sepaate spooler
file that prints independently of the main report.  That is, I am going to
guess that the Excel spread sheets will print first and the then complete
access report will print.

Someone will have to manually colate the excel print out with the access
parts tickes.

Maybe I am way off base but I am guessin that Gabby would like to print a part
tickets and then immediately print the excell check list.  That way manually
collation of the two different reports would be minimized.

Is there any way to print a page in Access and close that spool file, which
will cause that page to be printed, run the excel shell to print the
spreadsheet, and then open a new spool file for the next page, and repeat the
process again?


I ask this question, because I have a similar issue.


Thanks

Dennis

The PrintOut method has page range option and applies to the active object.

bhicks11 via AccessMonster.com replied to Dennis
23-Mar-10 12:34 PM
The PrintOut method has page range option and applies to the active object.
So, open the report and run:

DoCmd.Printout acPageRange, 1,2

See Access Help.

Bonnie




--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201003/1
Bonnie,Thanks for that little gem.Dennis
Dennis replied to bhicks11 via AccessMonster.com
23-Mar-10 10:32 AM
Bonnie,

Thanks for that little gem.

Dennis
Post Question To EggHeadCafe