Re: AllowBypassKey



I have tried this, copied the code and followed instructions. I get error
message:
"Compile Error:
Expected:="

Any further assistance?
Thanks

"Joan Wild" wrote:

> Copy your database.
>
> Make sure you are in the main database window. Click the "modules" tab, then
> select "new." Alternatively, you can open an existing module if you have
> one.
>
> Copy/paste the following function into it. Save the module giving it some
> name other than DisableShiftKeyBypass.
>
> **start**
>
> Function DisableShiftKeyBypass() As Boolean
> On Error GoTo errDisableShift
>
> Dim db As Database
> Dim prop As Property
>
> Set db = CurrentDb()
>
> On Error Resume Next
> db.Properties.Delete "AllowByPassKey"
> On Error GoTo errDisableShift
>
> Set prop = db.CreateProperty("AllowByPassKey", dbBoolean, False, True)
> db.Properties.Append prop
> DisableShiftKeyBypass = True
>
> exitDisableShift:
> Set prop = Nothing
> Set db = Nothing
> Exit Function
>
> errDisableShift:
> MsgBox "Function DisableShiftKeyBypass did not complete successfully."
> DisableShiftKeyBypass = False
> Resume exitDisableShift
>
> End Function
>
> ***end***
>
> Click on Debug, Compile, and then close the module saving it.
>
> At the database window, hit Ctrl-G which will open the debug window.
>
> Type DisableShiftKeyBypass() and hit enter.
>
> The next time you open the db, the shift will be disabled.
>
> You only need to run the sub once to set the property and then it is set.
> It isn't something you would run repeatedly as it isn't necessary.
>
> You can go back to that copy you made in step 1 (which you'll keep in a safe
> place) when you want to make changes, or you can use another database to
> set the prop back on this database.
>
> Or you could use Albert's utility to set it on/off. Look for By Pass Shift
> Key Code at
> http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
>
> --
> Joan Wild
> Microsoft Access MVP
>
> "Sherry" <Sherry@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:F06085E7-48D3-4F19-BD28-A410BCA62D61@xxxxxxxxxxxxxxxx
> > can any one tell me step by step way how to use this property to stop
> users open the database by pressing shift key, I have tryed different codes
> but i dont know where to put that code and where is the immidiate window, so
> pls tell me step by step how to do this. thanks
>
>
>
.



Relevant Pages

  • Re: Bypass Shift Key Problems...Help Please
    ... Dim ws As Workspace ... Dim db As Database ... Dim prop As Property ... MsgBox "Function DisableShiftKeyBypass did not complete ...
    (microsoft.public.access.security)
  • Re: AllowBypassKey
    ... Make sure you are in the main database window. ... Function DisableShiftKeyBypass() As Boolean ... Dim prop As Property ... At the database window, hit Ctrl-G which will open the debug window. ...
    (microsoft.public.access.security)
  • Re: AllowBypassKey
    ... Make sure you are in the main database window. ... Function DisableShiftKeyBypass() As Boolean ... Dim prop As Property ... At the database window, hit Ctrl-G which will open the debug window. ...
    (microsoft.public.access.security)
  • Re: AllowBypassKey
    ... Dim prop as DAO.property ... "Joan Wild" wrote: ... Make sure you are in the main database window. ... Function DisableShiftKeyBypass() As Boolean ...
    (microsoft.public.access.security)
  • Re: AllowBypassKey
    ... > Make sure you are in the main database window. ... > Function DisableShiftKeyBypass() As Boolean ... > Dim prop As Property ... > At the database window, hit Ctrl-G which will open the debug window. ...
    (microsoft.public.access.security)