ايران ويج

نسخه‌ی کامل: ست کردن Bypass key
شما در حال مشاهده‌ی نسخه‌ی متنی این صفحه می‌باشید. مشاهده‌ی نسخه‌ی کامل با قالب بندی مناسب.
دوستان سلام
وقتی یک فرم رو بصورت استارت آپ در اکسس نمایش می دیم واسه غیر فعال کردنش میشه کلید شیفت رو گرفت و دیزاین رو آورد.
طبق مطلب زیر از هلپ اکسس با ست کردن مقدارAllowBypassKey
میشه این کلید رو غیر فعال کرد.
لطفا بگین چطوری اینکار رو انجام بدیم؟
ماکرو یا کدی که گفته رو چطوری باید پیاده سازی کرد




کد:
Ignore startup options
If you used the Startup dialog box (Tools menu) or created an AutoExec macro or an Open event procedure to specify what happens when you open a Microsoft Access application, you can bypass those settings to regain full access to your Access file.

Hold down the Bypass key (the SHIFT key) while you open the database.
Note   You can disable the bypass key by writing a macro or Microsoft Visual Basic for Applications code that sets the AllowBypassKey property of the database to False.

با تشکر از همگی
????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????????????????
لطفا این کد رو امتحان کنید
بعضی وقتا واسه دیتابیس خطای Type Mismatch میده
اگه ممکنه شما تست کنید ببینید این مشکل رو دارید؟
سلام
دوست عزيز من تست كردم مشكلي نداشت ممكنه به ورژن اكسس مورد استفاده شما مرتبط باشه .
دوستان اين کد کار خاصي انجام نميده .صرفا Property مورد نظر رو ايجاد ميکنه و مقدار ميده
حالا چرا توي access 2002 اجرا نميشه الله اعلم
کد:
Option Compare Database
Option Explicit
' This code is from the Access. Web
' check out:
'
Function ChangeProperty(strPropName As String, _
                   varPropType As Variant, _
                   varPropValue As Variant, _
                   dbs As Database) As Integer
' The current listing in Access help file which will
' let anyone who can open the db delete/reset any
' property created by using this function, since
' the call to CraeteProperty doesn't use the DDL
' argument
'
Dim 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

این کد توی اکسس 2000 جواب میده اما غیر از اون نه!!!

عدم نمايش ديزاين جدول هاي اکسس گام مثبتي توي امنيتشه
لطفا بفرماييد جريان چيه؟!!!