Solved

F11 KEY

Posted on 2006-10-19
6
1,680 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 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dsum Function for List Box Data 7 45
Documents and settings folder 30 78
Access on Mouse move 5 33
Access subform not displaying on tab in naviation form 5 28
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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