اذهب الي المحتوي
أوفيسنا

تمكين مفتاح الشفت بعد الالغاء


husseinharby

الردود الموصى بها

Function EnableShift()
'This function enables the SHIFT key at startup. This action causes
'the Autoexec macro and the Startup properties to be bypassed
'if the user holds down the SHIFT key when the user opens the database.

On Error GoTo errEnableShift

    Dim db As DAO.Database
    Dim prop As DAO.Property
    Const conPropNotFound = 3270

    Set db = CurrentDb()

    'This next line of code disables the SHIFT key on startup.
    db.Properties("AllowByPassKey") = True

    'function successful
    Debug.Print "Enabled Shift Key - Successful"
    GoTo ExitHere

errEnableShift:
    'The first part of this error routine creates the "AllowByPassKey
    'property if it does not exist.
    If Err = conPropNotFound Then
        Set prop = db.CreateProperty("AllowByPassKey", _
        dbBoolean, True)
        db.Properties.Append prop
        Resume Next
        Else
            MsgBox "Function 'ap_DisableShift' did not complete successfully."
            GoTo ExitHere
    End If

ExitHere:
    Set prop = Nothing
    Set db = Nothing
    Exit Function

End Function

 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information