Disable AllowBypassKey

D

DD

I need to disable the AllowBypassKey for my database. I
referred to Article 826765, excerpt below but typing it
into the immediate window, the code just disappears after
closing the database:

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

Amir

I have just dealt with the same problem so maybe this can
help you out, I haven't throughly tested it yet but it
seems it's working. But make sure you make backup of your
database first;

I have created 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 I would 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 hidding
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...
 
D

DD

Amir
Thank you for your post. I am going to turn this database
into an MDE file as this database is simply an interface
which uses link tables and I do not want anyone to be able
to even view or see anything about any of the objects. I
do not want to use securties other than just simple things
to hide the db objects and then turn the file into and MDE
file so that the users cannot get to the code. As I make
changes to the db I refer to the non-MDE file (or original
MDB file. Thanks for your suggestion. I will apply this to
future projects. These newsgroups are wonderful!
 
A

Amir

That's cool..
You can also go to this website and get more details about
security and permanently removing shift key option by
making a module. Just check out this site
http://www.tek-
tips.com/gfaqs.cfm/lev2/4/lev3/27/pid/181/fid/93
you might wanna use some of thse options in you other
projects. Good luck dude...
 
T

TC

You can not "permanently remove" the shift key option. Any user of the
Admins group of the appropriate workgroup file can run code to change that
property back the other way.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top