S
Sky
When running an Access 2007 application in Release mode for the user, I
hide the Navigation Pane by setting the "StartUpShowDBWindow" property
of the database to False.
That works fine. But the F6 key STILL moves to the hidden Navigation
Pane, even when the front-end database is compiled to a .Mde and the
Navigation Pane is explicitly hidden!
If the user presses F6 and Enter, then a (hidden) object is selected in
the Nav Pane and opens unexpectedly.
My opinion is if the Nav Pane is hidden, F6 should not move there. But
that is something Microsoft controls.
Here is an example, starting with the Pane hidden, and the focus on an
application form. The user presses the F6 key once (as is normal in
Access, or by mistake), with or without some other alphanumeric keys
that move to a particular object (e.g., "V" might move to the "Vehicle"
table), and press Enter. This unexpectedly opens the table directly as a
raw datasheet.
Worse yet, the user might accidentally select and run an update query
that changes data, without realizing he is doing so.
Right now, my approach is to remap the F6 key to a safe action using the
AutoKeys macro. However, I would like the AutoKeys macro to "RunCode"
that is safe in Release mode, but still lets me use F6 in developer mode
with the Navigation Pane open. Something like:
If isDebug Then
' is there a RunCommand equivalent for F6?
SendKeys "{F6}" ' does not work?
Else
fDisplay
End If
I hate to use SendKeys, but I'm not aware of any RunCommand that
simulates F6. But neither does SendKeys work for me anyway.
How to you handle the F6 issue when you hide the Navigation Pane? Is
there a way to control F6 for Release mode versus developer/debug mode?
Steve
hide the Navigation Pane by setting the "StartUpShowDBWindow" property
of the database to False.
That works fine. But the F6 key STILL moves to the hidden Navigation
Pane, even when the front-end database is compiled to a .Mde and the
Navigation Pane is explicitly hidden!
If the user presses F6 and Enter, then a (hidden) object is selected in
the Nav Pane and opens unexpectedly.
My opinion is if the Nav Pane is hidden, F6 should not move there. But
that is something Microsoft controls.
Here is an example, starting with the Pane hidden, and the focus on an
application form. The user presses the F6 key once (as is normal in
Access, or by mistake), with or without some other alphanumeric keys
that move to a particular object (e.g., "V" might move to the "Vehicle"
table), and press Enter. This unexpectedly opens the table directly as a
raw datasheet.
Worse yet, the user might accidentally select and run an update query
that changes data, without realizing he is doing so.
Right now, my approach is to remap the F6 key to a safe action using the
AutoKeys macro. However, I would like the AutoKeys macro to "RunCode"
that is safe in Release mode, but still lets me use F6 in developer mode
with the Navigation Pane open. Something like:
If isDebug Then
' is there a RunCommand equivalent for F6?
SendKeys "{F6}" ' does not work?
Else
fDisplay
End If
I hate to use SendKeys, but I'm not aware of any RunCommand that
simulates F6. But neither does SendKeys work for me anyway.
How to you handle the F6 issue when you hide the Navigation Pane? Is
there a way to control F6 for Release mode versus developer/debug mode?
Steve