startup and the shift key bypass

D

DawnTreader

hello all

i have a quick question about the timing of the shiftkey bypass and the
running of code.

when you run code on the start up form, does it come first, or does the
shift key bypass happen before that? my semi educated guess is the shift key
bypass. is that correct?

the reason i ask is that i was thinking of getting my frontend to see if it
was a .mdb or .mde and make a decision on the extension to either turn off
the shift key bypass or leave it on. but if my suspicion is correct then the
code wont make any difference.

is there anyway to programmitcally check before the user can use the shift
key?

the reason i ask is that i would rather not have one more step in my process
of publishing the frontend i am working on and if the db could make that
decision itself then it would be very helpful and more efficient than the
alternatives.
 
R

Rick Brandt

DawnTreader said:
hello all

i have a quick question about the timing of the shiftkey bypass and
the running of code.

when you run code on the start up form, does it come first, or does
the shift key bypass happen before that? my semi educated guess is
the shift key bypass. is that correct?

The shift key bypass happens INSTEAD OF all of your startup properties and
code being loaded. There is no before or after aspect to it.
the reason i ask is that i was thinking of getting my frontend to see
if it was a .mdb or .mde and make a decision on the extension to
either turn off the shift key bypass or leave it on. but if my
suspicion is correct then the code wont make any difference.

It won't work, but not for the reason you think.
is there anyway to programmitcally check before the user can use the
shift key?
No.

the reason i ask is that i would rather not have one more step in my
process of publishing the frontend i am working on and if the db
could make that decision itself then it would be very helpful and
more efficient than the alternatives.

Enabling or disabling the shift key makes a difference for the NEXT time you
open the file. It has no effect on THIS time.
 
D

DawnTreader

The shift key bypass happens INSTEAD OF all of your startup properties and
code being loaded. There is no before or after aspect to it.

hmmm... never thought of it that way. but if that is the case, how does
access know that the property is set to true or false? what does it do to
find out whether the shift key should work or not?
It won't work, but not for the reason you think.
ok.

No.

all or nothing. hmmm.
Enabling or disabling the shift key makes a difference for the NEXT time you
open the file. It has no effect on THIS time.

i knew this tidbit. the problem is that i dont want it to allow the shift
key if it is an mde file, to allow it if it is an mdb file. this would allow
me to publish and not have to go change the setting after creating the mde.
additionally this is a security measure that i am trying to put in place. i
dont want the user to have access to the internals of the application i have
made. this is the last hole in my security.
 
R

Rick Brandt

DawnTreader said:
hmmm... never thought of it that way. but if that is the case, how
does access know that the property is set to true or false? what does
it do to find out whether the shift key should work or not?

It's a property of the file, that Access' internal code can interrogate
before your file loads, but which your VBA code and macros cannot (because
they haven't been loaded yet).
all or nothing. hmmm.


i knew this tidbit. the problem is that i dont want it to allow the
shift key if it is an mde file, to allow it if it is an mdb file.
this would allow me to publish and not have to go change the setting
after creating the mde.

You can do that, but it means that the MDE needs to be opened at least once
before you distribute it. Or you can take the chance that a user is not
going to think about using the shift key on the very first time that they
open your file.
additionally this is a security measure that
i am trying to put in place. i dont want the user to have access to
the internals of the application i have made. this is the last hole
in my security.

Well in an MDE they don't have access to anything but tables and queries and
even with the bypass key disabled they can still import all of your queries
and tables into another file to look at them so I wouldn't beat yourself up
over this too much. Not to mention that there are now utilities that can
change an MDE back into an MDB for all intents and purposes.

In addition, anyone who knows the code to disable the bypass key can run a
line of code on your file to re-enable it unless you also apply user level
security (which can also be hacked with utilties on the internet).

Honestly all you are doing is throwing up theater ropes. They will keep
those who adhere to the rules of polite society in line, but anyone who
actually desires to jump line can do so with a little knowledge and effort.
 
D

DawnTreader

It's a property of the file, that Access' internal code can interrogate
before your file loads, but which your VBA code and macros cannot (because
they haven't been loaded yet).



You can do that, but it means that the MDE needs to be opened at least once
before you distribute it.  Or you can take the chance that a user is not
going to think about using the shift key on the very first time that they
open your file.


Well in an MDE they don't have access to anything but tables and queries and
even with the bypass key disabled they can still import all of your queries
and tables into another file to look at them so I wouldn't beat yourself up
over this too much.  Not to mention that there are now utilities that can
change an MDE back into an MDB for all intents and purposes.

In addition, anyone who knows the code to disable the bypass key can run a
line of code on your file to re-enable it unless you also apply user level
security (which can also be hacked with utilties on the internet).

Honestly all you are doing is throwing up theater ropes.  They will keep
those who adhere to the rules of polite society in line, but anyone who
actually desires to jump line can do so with a little knowledge and effort..

well i guess i have done all i can then. i will just have to make the
disabling part of my publish routine. there is a tool that i found
from somewhere that you give a path to a database, mde or mdb, and
then tell it to disable the shift key and it does. its pretty slick,
but still requires me to take an additional step.

oh well...
 

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

Similar Threads


Top