Re: Setting AllowBypassKey Property



CurrentDB.Properties("AllowBypassKey") = True

Will work fine within the current db. The trick is how to call it securely.

I always have a "back door" in the UI, say a logo or label on the main form
that has a click event attached to it. Said event prompts me for a password
& if successful it changes various "Production" settings (including
AllowBypassKey, show DatabaseWindow, BuiltInToolbars, Hidden/System objects,
etc.) into "Design" mode. I then close the db & reopen with Shift pressed.
As long as I open the DB with shift pressed, the app stays in Design mode.

I have code in a startup routine (which only runs if shift is NOT pressed)
that sets AllowBypass to False (etc...), so all my "Production" settings are
restored the first time I (or anyone) open the db without Shift pressed.
This almost completely eliminates worrying about "forgetting" to reset
something. Even if I do forget, odds are the first user will set things
right.

HTH,


"Janie" <Janie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BE3913DA-2A76-42C3-9D2A-0FB4BB7B310A@xxxxxxxxxxxxxxxx
So if I get this right -- the only way to disable the BypassKey is to open
the file from a DIFFERENT DB and set the AllowBypassKeyProerty=False as
part
of the command that launches the SECOND DB????

There is no way to disable this command as a property WITHIN the file
itself????

"Bob Bonta" wrote:

Janie,

I actually have an access app that does that very thing. Although ...
I've
not tested on v97 database.

The thing to remember is that you want to set the key in a different mdb
than the one in which you are working. The app I have prompts
(WindowAPI)
for the database to be modified and then either changes to the key or
adds
the key and sets its value (True/False).

I don't see an option in this reply form to attach a file ... not sure
how I
can deliver it to you - free of charge. As soon as I figure out how to
attach a file to a reply form here, I will.

Bob ...
--
~ Bob Bonta ~


"Janie" wrote:

Working in Access 97. Want to set AllowBypassKey property to False.
Got the
code .. but what do I attach it to???

Thanks

Janie



.



Relevant Pages

  • Re: sql server express connection
    ... is that though the data has been refreshed and the win app ... reconnects to the database to collect the updates it does not ... better way of 2 apps using the same database without having to attach it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Setting AllowBypassKey Property
    ... Doug Steele, Microsoft Access MVP ... "Bob Bonta" wrote: ... not tested on v97 database. ... I don't see an option in this reply form to attach a file ... ...
    (microsoft.public.access.modulesdaovba)
  • Re: Portable Database Choice
    ... I searched this group quite a bit looking for database alternatives and did find the options below from this search. ... I'm posting this in the hope it can be of use to other developers in a position similar to mine where I needed a low cost alternative to Pocket Access. ... One app requires synchronization between desktop and mobile device, the other requires a push of data from the desktop to mobile. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Portable Database Choice
    ... > database alternatives and did find the options below from this search. ... One app requires ... > push of data from the desktop to mobile. ... > Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)
  • Portable Database Choice
    ... database alternatives and did find the options below from this search. ... of data from the desktop to mobile. ... The read-only app requires speedy lookup of data in a flat table ... Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)