Prevent Ctrl+P while on report preview

  • Thread starter Thread starter Savvoulidis Iordanis
  • Start date Start date
S

Savvoulidis Iordanis

How can I prevent the user from pressing Ctrl+P to open the print dialog
when on report preview?
I want this, because I must do some stuff when the user actually prints the
report, so it must be printed using my user interface.

Also, how can I determine that the report is actually sent to the printer
and not just previewed ?

TIA
Savvoulidis Iordanis
Greece
 
Hello Savvoulidis.

Savvoulidis Iordanis said:
How can I prevent the user from pressing Ctrl+P to open the print
dialog when on report preview?
I want this, because I must do some stuff when the user actually
prints the report, so it must be printed using my user interface.

Create a macro group named AutoKeys.
In this group, create a macro with macroname (make that column visible using
the view menu) of "^p" (without the quotes). If this macro contains no
action, then nothing will happen when the user presses Ctrl+P. Of course,
you can also add actions like OpenForm or RunCode.
Also, how can I determine that the report is actually sent to the
printer and not just previewed ?

Use the "Normal" view instead of "Preview".
If using VBA, change "acViewPreview" to "acViewNormal".
 
Thanks.
For the 2nd question, I meant how to determine the report is sent to the
printer inside code in the report object.
Is it possible?
 
Back
Top