FredixBlog


Just my log about anything I could find enjoyable.



Disable shift key

author Posted by: fredometro on date Jan 1st, 2004 | filed Filed under: MS-Access

Prevents the user to bypass auto-form or auto-macro by pressing shift key.
More options are set to user mode.
Function SetStartupProperties()
    ChangeProperty “StartupForm”, dbText, “Customers”
    ChangeProperty “StartupShowDBWindow”, dbBoolean, False
    ChangeProperty “StartupShowStatusBar”, dbBoolean, False
    ChangeProperty “AllowBuiltinToolbars”, dbBoolean, False
    ChangeProperty “AllowFullMenus”, dbBoolean, True
    ChangeProperty “AllowBreakIntoCode”, dbBoolean, False
    ChangeProperty “AllowSpecialKeys”, dbBoolean, True
    ChangeProperty “AllowBypassKey”, dbBoolean, True
End Function

Function ChangeProperty(strPropName As String,
varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Database, prp As Property
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
    Set prp = dbs.CreateProperty(strPropName, _
        varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
Else
    ChangeProperty = False
    Resume Change_Bye
End If
End Function

tag19 Responses to “Disable shift key”

  1. Buy Viagra Said,

    I inclination not agree on it. I over nice post. Especially the title attracted me to review the sound story.

  2. WP Themes Said,

    Nice dispatch and this fill someone in on helped me alot in my college assignement. Say thank you you on your information.

  3. Vigrx Plus Said,

    Brim over I agree but I dream the post should have more info then it has.

  4. Vigrx Plus Said,

    Easily I to but I think the list inform should prepare more info then it has.

     Add A Comment

You must be logged in to post a comment.