Hello, I need to only print the first page of my report using vba and I need to not open the report so it needs to be hidden. I also would like to get a dialog but I cant figure it out... I can get it to print the one page using the code below but it briefly opens a preview of the report so I tried achidden and that just shows it in design view briefly then prints.
To get a dialg I can use DoCmd.RunCommand acCmdPrint and the dialog comes up but it prints the current visable page/form thats has focus. Here is what code I have as of now.
I can get it to print using...
but I need it to only print one sheet and would like it to print with a dialog. The reason I dont want to see the preview is because it a bunch of bar cods and the preview is a blank page. I dont really care to much about the dialog but the one page is a must.
Ideas?
Thanks,
SoggyCashew.....
To get a dialg I can use DoCmd.RunCommand acCmdPrint and the dialog comes up but it prints the current visable page/form thats has focus. Here is what code I have as of now.
Code:
DoCmd.OpenReport "rpt_PrintRejectSlip", acViewPreview
DoCmd.PrintOut acPages, 1, 1
DoCmd.Close acReport, "rpt_PrintRejectSlip"
I can get it to print using...
Code:
DoCmd.OpenReport "rpt_PrintRejectSlip", acViewNormal
but I need it to only print one sheet and would like it to print with a dialog. The reason I dont want to see the preview is because it a bunch of bar cods and the preview is a blank page. I dont really care to much about the dialog but the one page is a must.
Ideas?
Thanks,
SoggyCashew.....