G
Gwen H
I'm learning VBA, and I have written a function that essentially opens a
series of reports, prints out each page of the report to the Acrobat
Distiller, and then closes the report (code snippet included at bottom of
this post). How can I use VBA to go to a specific record in the report? Each
report consists of multiple pages. Each page is essentially sales data for
one commercial banker. So, each page needs to be printed to a separate PDF
file. As you can tell from the code below, I'm currently using DoCmd.Printout
to specify the page, but I'd rather use VBA to find the page for a specific
banker, then print just that page to the Acrobat Distiller. The reason for
this is I need to make sure the right page gets printed to the right file. I
don't need any bankers looking at another banker's sales data.
Thanks in advance,
GwenH
'Print the Commercial Banker-Large Market Worksheets.
DoCmd.OpenReport "Commercial Banker Incentive Worksheet-Large Market",
acViewPreview
MsgBox "Save As ""CB Large Market Month 2006""", vbOKOnly, "Lenise
Braziel's Copy"
DoCmd.PrintOut , , , acHigh, 1, True
MsgBox "Now copy that file to Martha Miller's Folder - Click OK When
Finished.", vbOKOnly, "Martha Miller's Copy"
MsgBox "Save As ""Balcer Worksheet Month 2006""", vbOKOnly, "Alene
Balcer's Worksheet"
DoCmd.PrintOut acPages, 1, 1, acHigh, 1, True
MsgBox "Save As ""David Worksheet Month 2006""", vbOKOnly, "Don David's
Worksheet"
DoCmd.PrintOut acPages, 2, 2, acHigh, 1, True
MsgBox "Now Copy Don's Worksheet to Alene's Folder - Click OK When
Finished.""", vbOKOnly, "Alene's Copy of Don's Worksheet"
MsgBox "Save As ""Burks Worksheet Month 2006""", vbOKOnly, "Steve Burks'
Worksheet"
DoCmd.PrintOut acPages, 3, 3, acHigh, 1, True
DoCmd.Close acReport, "Commercial Banker Incentive Worksheet-Large Market"
series of reports, prints out each page of the report to the Acrobat
Distiller, and then closes the report (code snippet included at bottom of
this post). How can I use VBA to go to a specific record in the report? Each
report consists of multiple pages. Each page is essentially sales data for
one commercial banker. So, each page needs to be printed to a separate PDF
file. As you can tell from the code below, I'm currently using DoCmd.Printout
to specify the page, but I'd rather use VBA to find the page for a specific
banker, then print just that page to the Acrobat Distiller. The reason for
this is I need to make sure the right page gets printed to the right file. I
don't need any bankers looking at another banker's sales data.
Thanks in advance,
GwenH
'Print the Commercial Banker-Large Market Worksheets.
DoCmd.OpenReport "Commercial Banker Incentive Worksheet-Large Market",
acViewPreview
MsgBox "Save As ""CB Large Market Month 2006""", vbOKOnly, "Lenise
Braziel's Copy"
DoCmd.PrintOut , , , acHigh, 1, True
MsgBox "Now copy that file to Martha Miller's Folder - Click OK When
Finished.", vbOKOnly, "Martha Miller's Copy"
MsgBox "Save As ""Balcer Worksheet Month 2006""", vbOKOnly, "Alene
Balcer's Worksheet"
DoCmd.PrintOut acPages, 1, 1, acHigh, 1, True
MsgBox "Save As ""David Worksheet Month 2006""", vbOKOnly, "Don David's
Worksheet"
DoCmd.PrintOut acPages, 2, 2, acHigh, 1, True
MsgBox "Now Copy Don's Worksheet to Alene's Folder - Click OK When
Finished.""", vbOKOnly, "Alene's Copy of Don's Worksheet"
MsgBox "Save As ""Burks Worksheet Month 2006""", vbOKOnly, "Steve Burks'
Worksheet"
DoCmd.PrintOut acPages, 3, 3, acHigh, 1, True
DoCmd.Close acReport, "Commercial Banker Incentive Worksheet-Large Market"