Hi everybody!
As You know, we can open the design view in access by hold Shift key and Open. However, I want to prevent users open my file access in design view.
Please help me create function to change the Shift key by another key. Thanks for assistance!
13 8378
You can run this bit of code from any other access database: - Public Sub DisableShiftKeyBypass(strDB As String, bEnabled As Boolean)
-
-
Const conPropNotFound = 3270
-
-
On Error GoTo err_Handler
-
-
-
Dim db As DAO.Database
-
Set db = OpenDatabase(strDB)
-
db.Properties("AllowByPassKey") = bEnabled
-
db.Close
-
Set db = Nothing
-
Exit Sub
-
-
err_Handler:
-
If Err.Number = conPropNotFound Then
-
Dim prop As DAO.Property
-
Set prop = db.CreateProperty("AllowByPassKey", dbBoolean, bEnabled)
-
db.Properties.Append prop
-
Resume Next
-
Else
-
MsgBox "Procedure [DisableShiftKeyBypass] was not succesfull" & vbNewLine & Err.Number & Err.Description
-
End If
-
-
End Sub
This will disable or enable the shift bypass key.
Note that it is just as easy for another user with the same or similar code to re-enable it. This is simply to prevent the average nosy user from getting to the backstage.
You can make access difficult to get too, but making it 100% secure is not possible. In most cases where access is used it also is not necessary.
Thank for assitance !!
But i want to change Shift key by another key. just only the owner can open it. i tried on some functions disable Shift in internet.However, if users is good person in access , they stell can enable SHift by function .That reason I want to change the another key replace Shift key.Please help me. Thanks a lot of!!!!!
You cannot completely disable it, in such a way as it can't be re-enabled.
You can compile your code, and release it as a MDE/ACCDE, with keyboard shortcuts disabled, and navigation pane hidden, and the shift key disabled. You can add password protection to your modules, but access will never be 100% safe.
You can use Access Runtime for those users that don't need administrative access. This takes away all design ability (VBA, Shift+open, navigation pane, etc.). If you are running Access 2010, then Access Runtime 2010 is free. I use this all the time at work. I have one of the only Access licenses while all the users just have Runtime.
I haven't used runtime, but wouldn't that only work if they don't have a license for it?
I assume you mean a license for Access? What happens is that you package the database which creates an installation file with a .accdr extension which defaults to open with Runtime even if Access is installed. I'm not sure if Access can even open a .accdr file or not. The only issue with runtime is that all ribbon bar (Access 2007 & 2010) controls are gone. If you need certain abilities (copy, cut, paste, etc.) in the ribbon bar, they must be added manually.
As I said, no real experience with runtime but I believe I heard that you can simply rename the filetype accdb and you are back in business. That might just be my mind going though.
I just tested your theory and you are correct. Renaming it does get you past the security.
NeoPa 32,557
Recognized Expert Moderator MVP Alias90:
But i want to change Shift key by another key. just only the owner can open it.
The Bypass Key (Shift) is inbuilt into the Access (and all Office) application. Unless you join the MS Access development team you won't be able to manage that.
If you disable the Bypass key for your project though, you could add some code to check for another key as the first code to run in the form that is set to open by default when the project is started. If the key is detected at that point then the code could stop and this would give a very similar result to the Bypass key.
Just because you can code your own sort of "shift" functionality, just remember that you are not going to remove the ability of someone else to re-enable the shift. You can set a password on your entire DB which means the user must have the password to disable the shift. This however also means the user must have the password to use the database, so you are pretty much back to start.
Thanks everybody a lot of! a new thread is great! I hope we have more and more good threads for us who are newbie in access to improve our exp
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: John Howard |
last post by:
I have the following in a jythonc program to be executed in a html
file.
f1 = open("filename","r")
I get message about filePermission read error. Program compiles and
jar file is created....
|
by: Jakob Bieling |
last post by:
Hi,
I was wondering why there are file access modes, which you have to
specify when opening the file. I am specifically talking about the 'read',
'read-write' and 'write' distinction. As far as...
|
by: N. Graves |
last post by:
Help me please?
I'm have users import tables from other Access Database in one of the
process needed to use my ADB. To do this the user opens a form with a
field for the file directory and...
|
by: Cable |
last post by:
Hello,
I am hoping that someone can answer a question or two regarding file
access. I have created an app that reads an image from a file then
displays it (using OpenGL). It works well using...
|
by: Vinayak Raghuvamshi |
last post by:
I have a file that has been created using shared read/write access.
But C# code never is able to open this file for read and keeps
throwing "...cannot open file as it is being used by another...
| |
by: vvenk |
last post by:
Hello:
When I tried to use an Access database, I get the following exception:
Server Error in '/WebGrid' Application....
|
by: CliffKing |
last post by:
I am trying to use Windows Task Scheduler to run a batch file for an
already open MS Access database. Below is the syntax to the batch file:
Batch file: DailySalesExport.bat
REM This runs the...
|
by: ABCL |
last post by:
Hi All,
I am working on the situation where 2 different
Process/Application(.net) tries to open file at the same time....Or one
process is updating the file and another process tries to access...
|
by: Ryan Liu |
last post by:
Hi,
Both way works, I'd just ask some experts which way is better?
My application creates a log file daily.
Now each time when I write a log, I will open the file and append to the
end....
|
by: Wayne |
last post by:
How do I get rid of the generic Windows "Open File - Security Warning"
that appears when I try to open a database that resides on another PC
on my home network? This is not the annoying macro...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |