How to disable shift bypass key in Access 2000

P

Peter chin

Hi, MVPS team,

I need the help on the above matter to block the user by getting to my mdb
using shift by pass way. How am i going to do that ?

Thx

Peter.
 
P

Peter chin

Dear Mr Douglas,

But where this function shall be call ? In the macro name autoexec?
I'm using the A2k, once i paste the code to the module it come out a lot of
error during compile such as user types not define and etc.

Is that any for version 2k ?

Thanks.

Peter.
 
D

Douglas J. Steele

That's DAO code, so you need to ensure you've set a reference to DAO (Access
2000 and 2002 don't set it by default). With any code module open, select
Tools | References from the menu bar, scroll through the list of available
references until you find the one for Microsoft DAO 3.6 Object Library, and
select it. If you're not going to be using ADO, uncheck the reference to
Microsoft ActiveX Data Objects 2.1 Library

You only need to run the code once, so there's no need to even store that
code in your database. You can run it from the Debug window. It will take
effect the next time you try to use the database.
 
P

Peter chin

Hi, Doug,

I has try it and it compile successfully without error. But somehow rather i
still be able to use shift pass key to enter to the mdb files. Why did it
didn't disable the shift key by pass ?

As i read the helps, i didn't clear on this statement said "you can add it
by using the CreateProperty method and append it to the Properties
collection of the Database object."

what did it means and how to do it by using macro ?

Sorry for asking too many why and how here and there ... coz getting confuse
of it... Hope you don't mine.

Please advice and help.

Thanks.

Peter.
 
D

Douglas J. Steele

All that code does is change the value of a database property (and create it
if it doesn't already exist). You have to tell it what property to change.

Go to the Immediate Window and type

ChangePropertyDdl "AllowSpecialKeys", dbBoolean, True
 
Top