اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

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

قام بنشر

جربت الكثير من الاكواد لتعطيل أو إلغاء مفتاح  Shift ولم يفلح أي منها

 

واخيرا نتيجة البحث وجد الكود التالي

Option Compare Database

Option Compare Database
Public Function RunAtStart()
'    KillIt
    DetermineByPass

End Function

Public Function KillIt() As Integer

If SysCmd(SYSCMD_RUNTIME) = 0 Then
 MsgBox ("This Application cannot be opened directly with Microsoft Access," & vbCrLf & _
 "and can ONLY be opened with the desktop shortcut." & vbCrLf & vbCrLf & _
 "Please double click the shortcut on your desktop to open This Application." & vbCrLf & vbCrLf & _
  "This application will now close."), vbOKOnly, "My Application Name"
        Application.Quit
    End If
End Function

Public Function DetermineByPass()
    If Len(Dir(CurrentProject.Path & "\LetMeIn.txt")) = 0 Then
        SetStartupProperties (False)
    Else
        SetStartupProperties (True)
    End If
End Function

Public Sub SetStartupProperties(bolParameter As Boolean)

    ChangeProperty "StartupShowDBWindow", dbBoolean, bolParameter
    ChangeProperty "AllowBreakIntoCode", dbBoolean, bolParameter
    ChangeProperty "AllowSpecialKeys", dbBoolean, bolParameter
    ChangeProperty "AllowBypassKey", dbBoolean, bolParameter
    ChangeProperty "StartupShowStatusBar", dbBoolean, bolParameter
    ChangeProperty "AllowBuiltinToolbars", dbBoolean, bolParameter
    ChangeProperty "AllowFullMenus", dbBoolean, bolParameter
    ChangeProperty "AllowShortcutMenus", dbBoolean, bolParameter

End Sub

Public 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  ' Property not found.
        Set prp = dbs.CreateProperty(strPropName, _
        varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
    Else
        ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function


 'Add an AutoExec and set it to RunCode - RunAtStart()


 اعمل ماكرو  AutoExec  واكتب الامر التالي   RunCode  ثم اكتب   RunAtStart()

 

انا جربته على اكسيس 2013

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