Strange Print Problem

K

kt2902

My forms have a print button which prints a report displaying the same
information shown on the form. So far, so good.

I found that a few users were using Ctrl P to print and therefore printing
the form instead of the report.

I have fixed this problem by calling the print button code when the user
presses Ctrl P. This works great except for one form where it ignores the
keydown code, UNLESS I press the print button first. If the print button has
been pressed previously then Ctrl P works just the way I want it to. But if
you press Ctrl P before the print button is pressed the standard print dialog
opens. As this code is exactly the same as the other forms that work fine,
I'm a little confused as to whats going on.
 
K

kt2902

Ok, solved the problem. The code wasn't firing because the focus was in the
subform.
 
M

mcescher

My forms have a print button which prints a report displaying the same
information shown on the form. So far, so good.

I found that a few users were using Ctrl P to print and therefore printing
the form instead of the report.

I have fixed this problem by calling the print button code when the user
presses Ctrl P. This works great except for one form where it ignores the
keydown code, UNLESS I press the print button first. If the print button has
been pressed previously then Ctrl P works just the way I want it to. But if
you press Ctrl P before the print button is pressed the standard print dialog
opens. As this code is exactly the same as the other forms that work fine,
I'm a little confused as to whats going on.

Did you turn on the "Key Preview" attribute for the form?

Hope this helps,
Chris M.
 

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