Solved

F11 KEY

Posted on 2006-10-19
6
1,682 Views
Last Modified: 2012-05-05
For the longest time I thought I had a level of protection from amateur users to get in behind a switchboard. I de-activated the Shift enter key. I now find that even thought the shift funtion is diabled, hitting the F11 key will bring up the database and allow design view to modify tables queries etc.
Is there code I can write that will dis-able the f11 key yet once dis-abled allow me to re-enable it when I need
0
Comment
Question by:Jjuavinett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 17768667
you can set a password

from VBA window

Tools>DBName  Properties

select the protection tab

click on Lock project for viewing

set the password
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 17768682
disabling the F11 KEY is not good {imho}  i just set the password...
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17768732
What u can do is disable it in Tools/Startup

The way round this of course is if u open the database using the SHIFT key

Of course u can prevent this as well, by adding some code

What ive done in the past is to lock it down like this but have something on the switchboard somewhere which when double clicked (like a main menu label) will prompt for a pswd. When entered, it enables shift bypass. I close down and restart DB, all sorted, Im in!!!

Useful when on the user's PC, no additonal s/w required to be installed

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:BPeb
ID: 17768751
How about only giving your users an MDE (compiled) version of your application.  They shouldn't be able to do anything no matter what they hit since teh MDE doesn't allow modifications.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17768753
Here is sample code that here is a mixture of enabling/disabling
u can add this to a module somewhere

You will see there is StartupShowDBWindow and AllowBypasskey (the shift I was talking about)

Sub SetFullStartupProperties()
    ChangeProperty "StartupShowDBWindow", dbBoolean, False
    ChangeProperty "AllowBypassKey", dbBoolean, True
End Sub


Function ChangeProperty(strPropName As String, _
                        varPropType As Variant, _
                        varPropValue As Variant) As Integer
    Dim prp As Property
    Const conPropNotFoundError = 3270

    On Error GoTo Change_Err
    CurrentDb.Properties(strPropName) = varPropValue
    ChangeProperty = True

Change_Bye:
    Exit Function

Change_Err:
    If Err = conPropNotFoundError Then
        ' Property not found.
        Set prp = CurrentDb.CreateProperty(strPropName, varPropType, varPropValue)
        CurrentDb.Properties.Append prp
        Resume Next
    Else ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function




Of course, u dont have to do the bypass, just code it to enable/disable the StartupShowDBWindow bit
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 17790737
This shows how to enable/disable menus and F11 (as Cap says)

http://www.datamouse.biz/Developers_Files/General_Menus.html

0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question