From: Gabby Girl on
Good afternoon

Is it possible to print a report that's 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

From: bhicks11 via AccessMonster.com on
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's a sample:

Dim mspreadsheet
Dim macroname

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

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

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

Gabby Girl wrote:
>Good afternoon
>
>Is it possible to print a report that's 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

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

From: Dennis on
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'm 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'm way off base but I'm 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
"bhicks11 via AccessMonster.com" wrote:

> 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's a sample:
>
> Dim mspreadsheet
> Dim macroname
>
> mspreadsheet = "C:\spreadsheet.xls"
> macroname = something
>
> Shell ("excel.exe" & " " & mspreadsheet & macroname)
>
> Bonnie
> http://www.dataplus-svc.com
>
> Gabby Girl wrote:
> >Good afternoon
> >
> >Is it possible to print a report that's 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
>
> --
> Message posted via http://www.accessmonster.com
>
> .
>
From: bhicks11 via AccessMonster.com on
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



Dennis wrote:
>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'm 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'm way off base but I'm 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
>
>> Hi Gabby,
>>
>[quoted text clipped - 32 lines]
>> >
>> >Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201003/1

From: Dennis on
Bonnie,

Thanks for that little gem.

Dennis