Allow Bypass Key

D

Don

foreHi I have accidently set the bypass Key to false there cannot access the
database window at startup,is there any way to regain access.
 
B

Bill Mosca

Don

All you have to do is reset it from outside the database.

Dim WrkSp as DAO.Workspace
Dim dbsCurrent as DAO.Database

Set WrkSp = MyDBEngine.CreateWorkspace("", _
"Admin", "", dbUseJet)
Set dbsCurrent = WrkSp.OpenDatabase("C:\Databases\MyDatabase.mdb")
dbsCurrent.Properties("AllowBypassKey") = 0
Set dbsCurrent = Nothing
Set WrkSpc = Nothing

So much for blocking the bypass key, huh?

There is a utility I created for setting all the database properties from
outside the target db. It works on secured (provided you have an Admins ID
and password) or nonsecured db's. You can download it at
http://groups.yahoo.com/group/ms_access_professionals

You'll have to join to download it. Stay if you like or unsubscribe when you
are through downloading.
 
D

Don

Hi thanks for the tip tryed your software and when trying to conect to Dbase
it comes up with error 3033.Any Ideas?? The code you gave in your reply could
you expand on it please I'm a beginner.
Thanks
 
B

Bill Mosca

Sheesh! That's great advertizing!

If it is possible, can you send me the steps you took when the error
occurred? My email is wrmosca at myself dot com

I added comments to the code fo reach line. Hope that helps.
 
B

Bill Mosca

Doug

My Properties setter will work on a secured db if provided an Admins userID
and pwd. I haven't tested it against one where the DDL parameter was used.

The code i used sets a workspace using the UID and PWD.
 
T

Terry Kreft

Bill,
I'm guessing that Doug is talking about the code rather than your utility.

On DDL; if the user/pwd entered in your utility has dbSecWriteDef
permissions then they can change the value. This would normally be members
of the Admins group IIRC.
 
D

Don

Sorry didn't mean to put the software down I tried it on a couple of other
db's I've created and it worked fine. The steps i took were as follows,
opened the software and used the browse button to fine the mdb file (on
another partition of my hard drive) then clicked on "connect" this is when
the 3033 error came up saying I didn't have permission to access the file.I'm
using office Pro 2003, and only the VB code is passworded not the db itself.
 
D

Don

Sorry didn't mean to put the software down I tried it on a couple of other
db's I've created and it worked fine. The steps i took were as follows,
opened the software and used the browse button to fine the mdb file (on
another partition of my hard drive) then clicked on "connect" this is when
the 3033 error came up saying I didn't have permission to access the file.I'm
using office Pro 2003, and only the VB code is passworded not the db itself.
 
B

Bill Mosca

Doug

It might be the VBA password. The utility doesn't take that into account. If
I can find some time this weekend, I'll test it with a VBA password in place.
 

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