Prevent Ctrl+P while on report preview

  • Thread starter Savvoulidis Iordanis
  • 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
 
W

Wolfgang Kais

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".
 
S

Savvoulidis Iordanis

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top