By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Controlling Keys in REPORTS

P: n/a
Hello

In order to control keyboard keystrokes in my application, I use the
KeyPreview=Yes,
OnKeyDown Events of every Form with great success. HOWEVER, these
events are not available in REPORTS, opening up my application to ALL
Function/Ctrl/Alt keystrokes that a user can fire and cause problems.
In STARTUP I have Use Access Special Keys set to OFF.
I initially decided NOT to use the AutoKeys Macro, since it affects the
entire app globally, and does not seem to have the flexibility of the
KeyPreview method I'm using. One of my
forms uses a couple customized Ctrl,Alt, and Function keys. In REPORTS
I would like to have ALL FunctionKeys, ALL Ctrl Sequences, and ALL Alt
Sequences OFF, yet maintain my current control of the Forms. How do
I satisfy these requirements ?
I'm sure others must need to control KeyStrokes THROUGHOUT the
application!
Actually, I DoNot need any key strokes in REPORTS at all, just the
mouse click on my custom menu bar will do for Viewing, Printing, and
Exit.

ThankYou
Greg

Jul 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
By the way. In case it matters. I use a ReportMenu Form with buttons
for each Report, and use the following code under the button to call
each Report:

DoCmd.OpenReport strReport, acViewPreview, , strWhere
Ap******@gmail.com wrote:
Hello

In order to control keyboard keystrokes in my application, I use the
KeyPreview=Yes,
OnKeyDown Events of every Form with great success. HOWEVER, these
events are not available in REPORTS, opening up my application to ALL
Function/Ctrl/Alt keystrokes that a user can fire and cause problems.
In STARTUP I have Use Access Special Keys set to OFF.
I initially decided NOT to use the AutoKeys Macro, since it affects the
entire app globally, and does not seem to have the flexibility of the
KeyPreview method I'm using. One of my
forms uses a couple customized Ctrl,Alt, and Function keys. In REPORTS
I would like to have ALL FunctionKeys, ALL Ctrl Sequences, and ALL Alt
Sequences OFF, yet maintain my current control of the Forms. How do
I satisfy these requirements ?
I'm sure others must need to control KeyStrokes THROUGHOUT the
application!
Actually, I DoNot need any key strokes in REPORTS at all, just the
mouse click on my custom menu bar will do for Viewing, Printing, and
Exit.

ThankYou
Greg
Jul 10 '06 #2

P: n/a
OK

To my relief, I discovered that I can use the Autokeys Macro to disable
keys throughout the application, and still be able to override this in
my Forms using the KeyPreview/OnKeyDown to return certain functionality
like F1 if I choose. One problem is that the AutoKeys Macro does not
let you control ALL keys! The Alt key cannot be controlled here.
However, you can control the alt key with the KeyPreview/OnKeyDown
method. The AutoKeys Macro allows me to supress keys throughout the
app, including my problem with Reports, which could not be controlled
when I used the KeyPreview/OnKeyDown Method (since these are not
available in a Reports Events).
So, a combination of the aforementioned methods gave me the Best
keyboard control I could find. One last problem is that the
AutokeysMacro DoesNot allow control over the Alt key, however the
KeyPreview/OnKeyDown method did in Forms, BUT not in Reports.
Oh well! This I can Live with for now, with one exception. Alt-F4 in
reports, will shut down the application.

I Hope others find value in these findings!

Greg
Ap******@gmail.com wrote:
By the way. In case it matters. I use a ReportMenu Form with buttons
for each Report, and use the following code under the button to call
each Report:

DoCmd.OpenReport strReport, acViewPreview, , strWhere
Ap******@gmail.com wrote:
Hello

In order to control keyboard keystrokes in my application, I use the
KeyPreview=Yes,
OnKeyDown Events of every Form with great success. HOWEVER, these
events are not available in REPORTS, opening up my application to ALL
Function/Ctrl/Alt keystrokes that a user can fire and cause problems.
In STARTUP I have Use Access Special Keys set to OFF.
I initially decided NOT to use the AutoKeys Macro, since it affects the
entire app globally, and does not seem to have the flexibility of the
KeyPreview method I'm using. One of my
forms uses a couple customized Ctrl,Alt, and Function keys. In REPORTS
I would like to have ALL FunctionKeys, ALL Ctrl Sequences, and ALL Alt
Sequences OFF, yet maintain my current control of the Forms. How do
I satisfy these requirements ?
I'm sure others must need to control KeyStrokes THROUGHOUT the
application!
Actually, I DoNot need any key strokes in REPORTS at all, just the
mouse click on my custom menu bar will do for Viewing, Printing, and
Exit.

ThankYou
Greg
Jul 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.