Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Unanswered: Any Way of disabling shift bypass?

    i've unchecked every thing in the advanced startup options box yet i can still hold down shift while starting up to bypass the startup options, any way of stoping this, i'm concidering trying it on an mde but that would void my admin controls (if think, Admin control is access to startup option box and the database window through a custom toolbar)
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  2. #2
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    You can set the Property AllowBypassKey to False using VBA. The following code is an excerpt from the Access Help topic titled "Startup Properties Example". You would need to execute the code when the database starts up and it would only be effective after closing and then re-opening the database. One word of caution: Make sure to keep a source copy of the database without the code enabled around because you might need to go in and make changes.



    Startup Properties Example

    The following example shows a procedure named SetStartupProperties that passes the name of the property to be set, its data type, and its desired setting. The general purpose procedure ChangeProperty attempts to set the startup property and, if the property isn't found, uses the CreateProperty method to append it to the Properties collection. This is necessary because these properties don't appear in the Properties collection until they've been set or changed at least once.

    Sub SetStartupProperties()
    Const DB_Text As Long = 10
    Const DB_Boolean As Long = 1
    ChangeProperty "StartupForm", DB_Text, "Customers"
    ChangeProperty "AllowBypassKey", DB_Boolean, False
    End Sub

    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

    Change_Bye:
    Exit Function

    Change_Err:
    If Err = conPropNotFoundError Then ' Property not found.
    Set prp = dbs.CreateProperty(strPropName, _
    varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
    Else
    ' Unknown error.
    ChangeProperty = False
    Resume Change_Bye
    End If
    End Function
    Regards,
    Terry

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    i don't suppose you know where this code needs to be added do you?
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    Jun 2002
    Posts
    33

    Re: Any Way of disabling shift bypass?

    Try to secure and encrypt the databases !

    Good luck !

    PacuIonut

  5. #5
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by m.timoney
    i don't suppose you know where this code needs to be added do you?

    First, make a back-up copy of your database.

    Create a new Macro called Autoexec in the database you plan to deliver. In that macro, use the runcode action to execute the VBA stuff I sent out before. Autoexec will run automatically when the database is opened or you can manually execute it to create the property and set it to false. You'll need to save and close the database and then open it at least once to create the non-existing AllowBypassKey property in your database before the Bypass key will be disabled if you let Autoexec run automatically.

    After Autoexec has run, and the database has been closed, the bypass key will no longer function. Remember to make that back-up copy of your database!
    Regards,
    Terry

  6. #6
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    thanks that worked no more shift by pass
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  7. #7
    Join Date
    Jan 2002
    Location
    UK
    Posts
    67
    But how will u access the code in future if required apart from the back up copy.
    (Of course only if the back up copy is not working)

    Rohit

  8. #8
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by xzone
    But how will u access the code in future if required apart from the back up copy.
    (Of course only if the back up copy is not working)

    Rohit
    The idea is to deliver a secure version of the database to your users and keep a source copy of the database for development and testing. When a new version of the database is needed, it must be delivered from the back-up (source) copy of the database. This is really no different than when you create an MDE file.

    My procedure actually works like this:
    1) Develop database or application
    2) Create delivery copy of database/app MDB file
    3) Set startup options and disable desired shorcut keys in delivery copy of database/app MDB file
    4) Optional - create MDE file from MDB file
    Regards,
    Terry

  9. #9
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    as long as no one forgtes the admin password theres on problem as admin can get at the statup options, this is as i only disabled the shift bypass not the rest
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  10. #10
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    122
    Well...check this out:

    Sub ReEnableByPass()
    Dim db As DAO.Database
    Dim prp As DAO.Property

    Set db = DbEngine.OpenDatabase("C:\Path\FileName.mdb")
    On Error GoTo ErrHandler

    Set prp = db.Properties("AllowBypassKey")
    db.Properties.Delete prp

    Finish:
    Exit Sub
    ErrHandler:
    'probably the property didn't exist
    Resume Finish
    End Sub

    Sorry if I spoiled your joy, but this is not security...it's a joke...

  11. #11
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by DannyY
    Well...check this out:

    Sub ReEnableByPass()
    Dim db As DAO.Database
    Dim prp As DAO.Property

    Set db = DbEngine.OpenDatabase("C:\Path\FileName.mdb")
    On Error GoTo ErrHandler

    Set prp = db.Properties("AllowBypassKey")
    db.Properties.Delete prp

    Finish:
    Exit Sub
    ErrHandler:
    'probably the property didn't exist
    Resume Finish
    End Sub

    Sorry if I spoiled your joy, but this is not security...it's a joke...
    Good point! It's similar to:
    "Locks only keep the honest people honest."
    Regards,
    Terry

  12. #12
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    your quote is missing a line
    locks keep the honest, honest and those who don't know how to pick them :-) and though the users know about the shift bypass they have no idea how i've disabled it, besides with out Password protecting the database they can just import around it any way

    Originally posted by spraguetr
    Good point! It's similar to:
    "Locks only keep the honest people honest."
    Last edited by m.timoney; 11-14-02 at 09:04.
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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