Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

Unable to set the AllowShiftBypass in Microsoft Access

I am not able to access the macros in Microsoft Access to be able to set the AllowShiftBypass property. The Shift key does not work and I am not able to view the full menu items. So, I am not able to also access the design view. How do I set the AllowShiftBypass property in Microsoft Access 2010?

Thanks,

Shanthi
0
shanthi_joseph
Asked:
shanthi_joseph
  • 6
  • 4
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
The link below contains an MDB which allows you to 'set' and 'reset' the Shift Key Bypass from a REMOTE mdb.  
It's very cool. Scroll down the page to 'By Pass Shift Key Code'
And it works in A2010 also.
http://www.kallal.ca/msaccess/msaccess.html
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
This function will do it:
Function SetBypass(PathToDB As String)

    Dim dbs    As dao.Database
    Dim prop   As dao.Property
    Dim bFound As Boolean

    On Error GoTo SetBypass_Error

    Set dbs = dao.OpenDatabase(PathToDB)

    For Each prop In dbs.Properties
        If prop.Name = "AllowBypassKey" Then
            bFound = True
            prop = True
        End If
    Next prop

    If Not bFound Then
        '/ property was not found, so add it
        Set prop = dbs.CreateProperty("AllowBypassKey", dbBoolean, True)
        dbs.Properties.Append prop
    End If

SetBypass_Exit:
    On Error Resume Next
    dbs.Close
    Set dbs = Nothing
    Set prop = Nothing
    Exit Function

SetBypass_Error:
    Select Case Err.Number
            'Case 0
            'Case 1
        Case Else
            MsgBox "Error " & Err.Number & ": " & Err.Description & vbCrLf & vbCrLf _
                   & "Occured in Module1:SetBypass", vbOKOnly + vbExclamation, "Error"
            Resume SetBypass_Exit
    End Select
End Function

Open in new window

Add that to a Standard Module, then call it like this:

SetBypass("Full path to your database")

You'd need to do this from another database, not the one where you want to reset the Bypass key.

Also, if you're working with a compiled file (.accde or .mde) then you won't be able to go to design view at all.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Just noting of course that is exactly what Albert's db does - and it's already to go :-)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
shanthi_josephAuthor Commented:
I am still not able to access the code and design. I still obtain the Login form when I open the database by clicking on the Shift key at the same time and I am not able to see the full set of menus. I set the AllowShiftBypass property of the database by calling the SetBypass method from another database.

Thanks
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Did you use the mdb I posted ?
0
 
shanthi_josephAuthor Commented:
I copied the SetBypass standard module into another database and ran the module with the parameter containing the full path of the database that needs the AllowShiftBypass property to be set . After running the standard module, I opened the database by clicking the Shift key at the same time. The database opened displaying the login form without showing the full set of menu items.  What else needs to be performed to be able to open the database such that it displays the full set of menu items.

Thanks,

Shanthi
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
But did you try using the MDB I posted ... and point to the target db?
0
 
shanthi_josephAuthor Commented:
I used the database that was posted on the Web page. I obtained the message, Enable set, result = -1, when I try to enable the pass key. I am not able to see the full set of menu items when I open the database by clicking on the Shift key at the same time.  Do you know what may cause the result code of -1?

Thanks,
Shanthi
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Not sure what is going on.
Be *sure* to hold the Shift down before you Open ... and keep shift key down until db is fully loaded.

?
0
 
shanthi_josephAuthor Commented:
Thats great. I needed to hold the shift key down until db is fully loaded. Thanks so much.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Excellent.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now