1.8 Блокировка Shift

Поділитися
Вставка
  • Опубліковано 15 січ 2022
  • Защита клиентского файла Access от взлома путём блокировки клавиши Shift при запуске. Способ радикальный, т.к. окончательный файл открыть для редактирования объектов БД будет невозможно. Если, конечно, вы не профессиональный хакер))
    Внимание:
    1. Сначала рекомендуется выполнить процедуры из видео видео "1.3 Убрать все панели Access".
    2. Обязательно сделайте резервную копию - до того, как начнёте работать.
    3. На стадии №3 этого видео для создания модуля отключения клавиши Shift используем код VBA с оф. сайта Майкрософт:
    Function ap_DisableShift()
    'This function disable the shift at startup. This action causes
    'the Autoexec macro and Startup properties to always be executed.
    On Error GoTo errDisableShift
    Dim db As DAO.Database
    Dim prop as DAO.Property
    Const conPropNotFound = 3270
    Set db = CurrentDb()
    'This next line disables the shift key on startup.
    db.Properties("AllowByPassKey") = False
    'The function is successful.
    Exit Function
    errDisableShift:
    '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, False)
    db.Properties.Append prop
    Resume Next
    Else
    MsgBox "Function 'ap_DisableShift' did not complete successfully."
    Exit Function
    End If
    End Function
    Function ap_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
    Exit Function
    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."
    Exit Function
    End If
    End Function

КОМЕНТАРІ • 10

  • @msaccess-gk
    @msaccess-gk  2 роки тому

    ВНИМАНИЕ! Поддержать канал можно через Сбербанк 2202 2023 5272 6164

  • @user-kf3wo9qe3z

    Дай Бог тебе здоровья, добрый человек! Пусть путь твой будет ровным как водная гладь! Удачи во всех делах твоих и свершениях!

  • @user-om1kw2rb5g
    @user-om1kw2rb5g 2 роки тому +1

    Чем больше защит и блокировок тем больше себе проблем на голову....

  • @user-xl5mu5ik2y
    @user-xl5mu5ik2y 2 роки тому +1

    Область навигации всё время открывается при печати из базы. Если accde заглючил, то можно все объекты импортировать в пустую таблицу и там редактировать