Solved

F11 KEY

Posted on 2006-10-19
6
1,673 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
6 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

by:Rey Obrero
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now