Prevent Users from Moving to Hidden Navigation Pane

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
 
M

Mark Andrews

On side note: If the user is using the access 2007 runtime they can't make
this happen.
At least I couldn't when I tried.
On my computer I can only use F11 to bring up the navigation pane.

All I can think of is:
- using one of the keypress events everywhere (on every form).
- Perhaps make it so the db is always started in runtime mode? Use command
line option.
That's a guess at some workarounds.

Sorry can't help more. Hope you solve it. Would like to know the answer to
this one as well.

Mark
 

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