Question

Locked

Disable the AllowByPassKey

By Sabine.nelis ·
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?
Sabine

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Disabling 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", False

Close 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 Sub

2nd. HideDatabase
Private Sub HideDatabase_Click()
CurrentDb.Properties("AllowBypassKey") = False
End Sub

Both 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.

Collapse -

Disabling the AllowByPassKey.

by Sabine.nelis In reply to Disabling the AllowByPass ...

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

Collapse -

Check out this link

by Jacky Howe In reply to Disabling the AllowByPass ...

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.

Collapse -

no clue

by Sabine.nelis 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

Collapse -

I thought that it might be something like this mind you I am not 100% sure

by Jacky Howe 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*.

Collapse -

Disable AllowBypassKey

by Sabine.nelis In reply to I thought that it might b ...

hi,

another problem. In the Immediate window I type : CurrentProject.Properties.Add "AllowBypassKey", False

and ENTER
gives next line

then 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

Collapse -

So the first

by Jacky Howe 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

Collapse -

Did you try the second part i had put in there?

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.

Collapse -

Disabling the AllowByPassKey

by Sabine.nelis In reply to Disabling the AllowByPass ...

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

Collapse -

Check the syntax

by Jacky Howe In reply to Disabling the AllowByPass ...

http://usenet.p2preactor.com/index-t-1403239.html

< add >

ENTER.CurrentProject.Properties.Add "AllowBypassKey", False

Back to Software Forum
11 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums