View Full Version : How to select page(s) to print?


danyeungw
05-02-2007, 01:51 PM
The code "DoCmd.OpenReport "rptPartReserved", acViewPreview, , strFilter" displayed the report in preview mode. After the user clicked Print, it printed the whole report. Is there any ways that the user can select page(s) to print, like MS Word? Thanks.

DanYeung

Rich
05-02-2007, 02:34 PM
Use the PrintOut method or just press ctrlP

danyeungw
05-03-2007, 08:39 AM
Thanks Rich. Can you please give me an exmple how to use the Print Out method? Thanks again.

DanYeung

Rich
05-03-2007, 12:28 PM
DoCmd.PrintOut on a custom print button

danyeungw
05-04-2007, 02:12 PM
Sorry, I still don't get it. What is a custom print button. Thanks.

DanYeung

boblarson
05-04-2007, 02:15 PM
A button control you put on your form. You can also create a menu bar item, but the easiest is just a button on your form with the code Rich gave you behind it.

danyeungw
05-04-2007, 04:24 PM
DoCmd.PrintOut just print the report instead of preview the report first.

I added "DoCmd.RunCommand acCmdPrint" after "DoCmd.OpenReport "rptPartReserved", acViewPreview, , strFilter". The popup Print Dialog appeared but the report was not previewed. It came up blank. Any ideas how this work out that the report is preveiwed and the Print Dialog is also appeared?

Thanks.
DanYeung