Question
-
CreatorTopic
-
May 14, 2008 at 2:37 am #2146049
Disable the AllowByPassKey
Lockedby sabine.nelis · about 15 years, 11 months ago
Hi,
I’m working on a database with 2000 file format in access 2007 and wants to disable the AllowBypassKey to secure my database. When this key is not disabled users can start up the database holding the shift key. I’ve tried to do what is on this link http://www.mvps.org/access/general/gen0040.htm
but i can’t let it work. Can anyone help me?
SabineTopic is locked -
CreatorTopic
All Answers
-
AuthorReplies
-
-
May 14, 2008 at 2:37 am #2564641
Clarifications
by sabine.nelis · about 15 years, 11 months ago
In reply to Disable the AllowByPassKey
Clarifications
-
May 14, 2008 at 4:44 am #2564617
Disabling the AllowByPassKey.
by Anonymous · about 15 years, 11 months ago
In reply to Disable the AllowByPassKey
To set the AllowBypassKey property to False, follow these
steps:Start Access.
Open an Access database project.
In the Database window, point to Macro on the Tools menu,
and then click Visual Basic Editor.In the Visual Basic Editor, click Immediate Window on the
View menu.Type the following code or paste the following code in the
Immediate window, and then press
ENTER.CurrentProject.Properties.Add “AllowBypassKey”, FalseClose the Visual Basic Editor, and then close the Access
database project.Open the Access database project. Try to bypass the
startup options that are set for the Access database
project by holding down the SHIFT key while you open the
Access database project.The functionality of the SHIFT key that permits you to
bypass the startup option is disabled. Although you hold
down the SHIFT key to bypass the startup options, the
startup options are executed. You cannot bypass the
startup options.
……………………………………..
OR
Create form with to command buttons
1st. ShowDatabase
with following code:
Private Sub ShowDatabase_Click()
CurrentDb.Properties(“AllowBypassKey”) = True
End Sub2nd. HideDatabase
Private Sub HideDatabase_Click()
CurrentDb.Properties(“AllowBypassKey”) = False
End SubBoth of these are as you can see on click events.
And then assign security to this form so only
administrator would have rights to it. And then place it
on switchboard. This way you can toggle between hiding database window and showing it as you please. That way if
you are not running full menus in db you can still make changes later and you are not locked out. Thanks to Amir for this.Please post back if you have any more problems or questions.
-
May 16, 2008 at 2:03 am #2564376
Disabling the AllowByPassKey.
by sabine.nelis · about 15 years, 11 months ago
In reply to Disabling the AllowByPassKey.
Hello,
Thanks for your answer, but I got error on performing following step :
CurrentProject.Properties.Add “AllowBypassKey”, False
Error : 449 (The argument is not optional)How do I resolve this problem.
Can you help me?Thanks in advance
Sabine-
May 16, 2008 at 2:09 am #2564373
Check out this link
by rob miners · about 15 years, 11 months ago
In reply to Disabling the AllowByPassKey.
http://support.microsoft.com/kb/142138
http://www.mail-archive.com/dev@api.openoffice.org/msg06877.html
< bit more info >
It may give you a clue.
-
May 16, 2008 at 3:07 am #2564364
no clue
by sabine.nelis · about 15 years, 11 months ago
In reply to Check out this link
Sorry,
No clue. I understand the error, but not why. Just tried to follow the instructions mentioned by Peconet.
Sabine
-
May 16, 2008 at 3:42 am #2564361
I thought that it might be something like this mind you I am not 100% sure
by rob miners · about 15 years, 11 months ago
In reply to no clue
If you execute Test1 directly you will get the error #449 “Argument is
not optional” [look for “debugging Basic programs” in the Help index].
Test1 declares a parameter named aString, of type String; this means it
*expects* you to pass a string argument when you call it. If you just
run it, you will get the error “Argument is not optional” because you
are not passing the expected argument, in fact you are not passing any
argument at all. So “Argument is not optional” means you *must* pass an
argument when you call it, as the parameter is not declared to be
*Optional*. -
May 16, 2008 at 4:12 am #2564358
Disable AllowBypassKey
by sabine.nelis · about 15 years, 11 months ago
In reply to I thought that it might be something like this mind you I am not 100% sure
hi,
another problem. In the Immediate window I type : CurrentProject.Properties.Add “AllowBypassKey”, False
and ENTER
gives next linethen I type : CurrentDb.Properties(“AllowBypassKey”) = False
and i get the error : 3270 (Property not found). I thought I’ve just added it to my properties collection.
Don’t understand one thing about it.
Can anyone explain this to me!Sabine
sabine
-
May 16, 2008 at 2:17 pm #2563356
So the first
by rob miners · about 15 years, 11 months ago
In reply to Disable AllowBypassKey
part is working Sabine and now there is another problem. I am not a scripter, I have only been playing around with it. Do as I have been doing and Google the Error Codes that is how I have managed to get by in the past.
http://msdn.microsoft.com/en-us/library/aa140020(office.10).aspx
http://msdn.microsoft.com/en-us/library/aa195906(office.11).aspx
-
May 16, 2008 at 2:26 pm #2563355
Did you try the second part i had put in there?
by Anonymous · about 15 years, 11 months ago
In reply to Disabling the AllowByPassKey.
Go to my earlier post with the full page, scroll down until you see “OR”, then try that info.
Please post back if you have any more problems or questions.
-
-
May 19, 2008 at 12:21 am #2564952
Disabling the AllowByPassKey
by sabine.nelis · about 15 years, 11 months ago
In reply to Disabling the AllowByPassKey.
Hi,
Thanks for your reply.
Did everything you mentioned before, but it doesn’t work.
When I type : CurrentDb.Properties(“AllowBypassKey”) = False in the immediate window, I get an error 3270 (Property not found).
I’ve created a form ‘test’ with 2 command buttons like you told me to. Made this the display form in the applications options of the current database. When I toggle, nothing is happening. Still can use the Shift Key. Made also a switchboard ‘hide/show database’ with a button that opens the form ‘test’. Nothing happens.
Really don’t know want I’m doing wrong.Hope you can help me through this.
Thanks in advance,
Sabine-
May 19, 2008 at 12:36 am #2564949
Check the syntax
by rob miners · about 15 years, 11 months ago
In reply to Disabling the AllowByPassKey
http://usenet.p2preactor.com/index-t-1403239.html
< add >
ENTER.CurrentProject.Properties.Add “AllowBypassKey”, False
-
-
-
-
AuthorReplies