Loading...
Thursday, April 16, 2015

How to Disable Shift By Pass Key in MS Access MDE/ACCDE

Disable By Pass Key in Access
There might be a time when developing MS Access and you want to prevent user from holding down Shift Key to open MS Access application. As you might know, when you hold down the Shift Key while opening MS Access and this will bypass the Start-Up options and user can see every objects in the application. This is the thing that you don't want it to happen as the developer.

The good news is you can disable this bypassing features. The function below is the VBA code that you can apply to help on this. The .Properties("MDE") is the feature to check weather the current application is MDE (compiled application). This is the added feature to disable this only when we have compiled the application.

Usually, the file that we delivery to customer/user is the compiled application. This will be very handy when we still keep and continue developing the MDB/ACCDB file.

Public Function DisableByPass()
On Error GoTo err_proc
'Disable By Pass Key in mde/accde db

    Dim dbs As DAO.Database
    Dim prp As Property
    Dim strMDE As String
    
    Set dbs = CurrentDb
    With dbs
        On Error Resume Next
        strMDE = .Properties("MDE")         'If this is an MDE or ACCDE database, disable bypass key
        If Err = 0 And strMDE = "T" Then
            .Properties("AllowByPassKey") = 0
            If Err.Number = 3270 Then
                On Error GoTo err_proc
                Set prp = .CreateProperty("AllowBypassKey", dbBoolean, False)
                .Properties.Append prp
                .Properties.Refresh
            End If
        End If
    End With
        
exit_proc:
On Error Resume Next
    dbs.Close
    Set dbs = Nothing
    Exit Function
    
err_proc:
    MsgBox Err.Description
    Resume exit_proc
    
End Function
Next
This is the most recent post.
Older Post

3 comments:

  1. Replies
    1. How To Disable Shift By Pass Key In Ms Access Mde/Accde - Ms Access Tips And Tricks >>>>> Download Now

      >>>>> Download Full

      How To Disable Shift By Pass Key In Ms Access Mde/Accde - Ms Access Tips And Tricks >>>>> Download LINK

      >>>>> Download Now

      How To Disable Shift By Pass Key In Ms Access Mde/Accde - Ms Access Tips And Tricks >>>>> Download Full

      >>>>> Download LINK pF

      Delete
  2. 1XBET Casino NZ | Online Casino | $500 Welcome Bonus
    1XBET is the 1xbet one-stop betway login shop for everything that NJ casino players crave. You'll find hundreds of great matchpoint slot and video poker games to choose from.

    ReplyDelete

 
TOP