Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    15

    Unanswered: Shift bypass key...

    Hello.

    I have looked at the AllowByassKey property's help file and it says:
    "This property's setting doesn't take effect until the next time the application database opens."

    The question: Is there a way to flip AllowByassKey True/False depending on what user logs on to the db?

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Cool

    Yes.

    I've written code to do this, but I don't have it to hand. There should be something in the help file - basically cobbled my code from theirs.

    You will have to have your database secured and enter a user name. The allowbypasskey should be called form code, this code should be called form the Autoexec macro.

    The first piece of code should check the currentUser, e.g.

    If CurrentUser ="George" then
    exit sub 'Or omething to get you out of here
    Else
    AllowbypassKey=false 'or call another sub to set this
    end if

    Be aware though that when this has been run once the next time any user uses the database they will be able to use the Allowbypass key. If you open the database this way run it once more without using the bypass key.

    Also this code won't work the first time you run it, but it should the second time.

    And whatever else you do make a copy of your database before you start putting this code in!!

  3. #3
    Join Date
    Feb 2004
    Posts
    15
    Hello

    The key issue is that the AllowBypassKey property won't take effect until NEXT time the db is opened but I need to flip this property WHILE the db is being opened.

    I guess I'll have to make a small Lock/Unlock db that will flip this property on the target db and let the admin users Lock/Unlock it. I just thought there's a way to do this without second db.

  4. #4
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    AllowByPass

    Personally I've got tot he stage where I lock the database down so that no-one can bypass the opening macro, form etc, then leave a way in one one of the forms.

    By clicking on a button a dialogue form is opened, ths asks for a password, if the wrong password is entered the form closes, but when the orrect password is opened the database is exposed for a developer to make changes etc. This way you don't need to re-open the database or worry about security files etc, but it does have its weaknesses.

    :-#

  5. #5
    Join Date
    Feb 2004
    Posts
    15
    Hello.

    OK, I have created a small database that Shift key locks/unlocks the main db . This small db will be kept in a secured directory on the server along with the .mdw file.

    The next step is to prevent the main db from being copied/imported into a new/empty one. The best way everybody says is to protect the main db with a password but in the current set up users are asked for the main db password after logging on with their own IDs which sorta defeats the purpose.

    Question: Is there a way to submit main db password in the start up form code? This way, when the main db is Shift key locked wicked users won't be able to copy/import it into a new/empty one.

    Any ideas?

    P.S. the main db has a lot of very sensitive proprietary info ($$$ if sold).

  6. #6
    Join Date
    Feb 2004
    Posts
    199
    standart situation
    I've used this way
    Data and Application are spilt as different MDB files .
    Application uses links to the Data MDB, Data MDB is password protected, and Application is code protected (you can even use your own security sisted with user names and passwords, via forms and codes)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •