GrandMasterTuck
In need of medication
- Local time
- Today, 15:03
- Joined
- May 4, 2013
- Messages
- 129
Hi guys. I have a pretty locked-down access app that opens print previews of reports whenever a user wants to see one. There isn't a button or any command for the user to send the open report to a printer (just the button that opens the report in print-preview mode), so I put "(CTRL+P TO PRINT)" in the title bar of each report so the users know how to open the print dialog box in Windows to get a physical copy.
The issue is this: When users open the report (in print-preview mode, of course) and hit ctrl+P to print, upon successful print, the Print Dialog box closes, and then Access auto-deselects the report and selects the form behind the report. The user, not understanding that anything of the sort has happened, may try to click ctrl+P again to get a second printout, but then the stupid form prints (with wacky margin settings and horrible paper-waste), and they get spleeny with me. "Dude, WTF! Why can't I print something twice??"
I tried telling them to just click the report before doing ctrl+P a second time or maybe set the number of copies to an amount other than one, but this, alas, is far too much effort for any of them to put forth, and the mere fact that I suggest such an atrocity has caused them to drag out torches and pitchforks and lay siege to my cubicle. ... which might be a slight exaggeration, but that's what it FEELS like.
Anyway, does anyone know of a method I can use to have Access re-select an open Report object after a successful ctrl+P print? I tried firing a tempVar creation script with the form's OnFocus event (and the tempVar's value is then used as the check to see which object to set the focus to, since i have more than one report that opens from buttons like this)... didn't work. I tried this same creation script with the BUTTON's OnFocus event (the button that opens said report, which also, conveniently, gets focus once the print command fires and the report is de-selected)... didn't work.
Stumped. Ideas?
The issue is this: When users open the report (in print-preview mode, of course) and hit ctrl+P to print, upon successful print, the Print Dialog box closes, and then Access auto-deselects the report and selects the form behind the report. The user, not understanding that anything of the sort has happened, may try to click ctrl+P again to get a second printout, but then the stupid form prints (with wacky margin settings and horrible paper-waste), and they get spleeny with me. "Dude, WTF! Why can't I print something twice??"
I tried telling them to just click the report before doing ctrl+P a second time or maybe set the number of copies to an amount other than one, but this, alas, is far too much effort for any of them to put forth, and the mere fact that I suggest such an atrocity has caused them to drag out torches and pitchforks and lay siege to my cubicle. ... which might be a slight exaggeration, but that's what it FEELS like.
Anyway, does anyone know of a method I can use to have Access re-select an open Report object after a successful ctrl+P print? I tried firing a tempVar creation script with the form's OnFocus event (and the tempVar's value is then used as the check to see which object to set the focus to, since i have more than one report that opens from buttons like this)... didn't work. I tried this same creation script with the BUTTON's OnFocus event (the button that opens said report, which also, conveniently, gets focus once the print command fires and the report is de-selected)... didn't work.
Stumped. Ideas?
Last edited: