Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Bypass the bypass key (https://www.askmehelpdesk.com/showthread.php?t=635290)

  • Feb 12, 2012, 01:01 AM
    XYZ.2011
    Bypass the bypass key
    Hi everyone, I found a code for bypassing the shift key in access but I don't know where to keep this code. The codes are follows:
    =================================================
    Public Sub SetStartupOptions(propname As String, _
    propdb As Variant, prop As Variant)
    'Set passed startup property.
    Dim dbs As Object
    Dim prp As Object
    Set dbs = CurrentDb
    On Error Resume Next
    dbs.Properties(propname) = prop
    If Err.Number = 3270 Then
    Set prp = dbs.CreateProperty(propname, _
    propdb, prop)
    dbs.Properties.Append prp
    End If
    Set dbs = Nothing
    Set prp = Nothing
    End Sub
    =============================================
    The code above I don't know where I have to write this code and here the other code
    =============================================
    Call SetStartupOptions("AllowBypassKey", dbBoolean, False)
    Call SetStartupOptions("StartupShowDBWindow", dbBoolean, False)
    =============================================

    Please help!
  • Mar 30, 2012, 04:44 AM
    ScottGem
    Where did you find the code? There should have been instructions on how to use it.

    The SetStartup subroutine goes in a global module.

    The Call routines are what you run to set or unset the options.

  • All times are GMT -7. The time now is 03:09 PM.