1.8 Блокировка Shift
Защита клиентского файла 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
Видео 1.8 Блокировка Shift канала [msAccess]![ГлавныйКонструктор]
Внимание:
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
Видео 1.8 Блокировка Shift канала [msAccess]![ГлавныйКонструктор]
Показать
Комментарии отсутствуют
Информация о видео
16 января 2022 г. 23:36:56
00:04:56
Другие видео канала
![5.4 Пиктограмма на панели задач Windows](https://i.ytimg.com/vi/bisuU_7ITbE/default.jpg)
![6.2 Динамический веб-браузер](https://i.ytimg.com/vi/jGSMhb9RDU0/default.jpg)
![3.2 Кто в системе + фото пользователя](https://i.ytimg.com/vi/6-8gS80hAp8/default.jpg)
![7.2 Экспорт из Access в Excel с форматированием без сохранения связи с источником данных](https://i.ytimg.com/vi/tQwoaydfSU4/default.jpg)
![4.3 Открыть форму с предустановленным фильтром](https://i.ytimg.com/vi/EdlpWSpKji4/default.jpg)
![10.3 Кто в системе? Кто из пользователей находится в Базе данных?](https://i.ytimg.com/vi/6_vHI5osyg0/default.jpg)
![10.2 Создать клиентский файл в один клик](https://i.ytimg.com/vi/zUJ9c9GzA6k/default.jpg)
![10.1 Создать индивидуальный клиентский файл с определенными правами и ролью](https://i.ytimg.com/vi/gdXt3GdJ-Ms/default.jpg)
![7.3 Экспорт из Access в Word](https://i.ytimg.com/vi/tVeAUaNbAnE/default.jpg)
![4.4 Показать дубликаты](https://i.ytimg.com/vi/EVGnd9mCG_o/default.jpg)
![4.2 Кадры. Стаж работы сотрудника](https://i.ytimg.com/vi/nPHGDi8ns_s/default.jpg)
![5.6 Не всплывает всплывающая подсказка](https://i.ytimg.com/vi/s5wIr13YU_g/default.jpg)
![1.6 Форма в режиме "Только чтение" или "Чтение-запись"](https://i.ytimg.com/vi/Dmz5W-n1CAY/default.jpg)
![5.5 Выпадающий список в формате МММ.ГГГГ](https://i.ytimg.com/vi/R4QvMSbkC_A/default.jpg)
![1.7 Создание справки для своей базы данных Access](https://i.ytimg.com/vi/AP5ZlEo8cKM/default.jpg)
![9.1 Логическое поле вместо текстового. Сложение логических полей. Правило проверки нескольких полей](https://i.ytimg.com/vi/HaMqSM49blI/default.jpg)
![6.1 Динамические кнопки и гиперссылки](https://i.ytimg.com/vi/YW21GJX1JdM/default.jpg)
![5.3 Вычитание данных между таблицами](https://i.ytimg.com/vi/DZPFWRagPKg/default.jpg)
![5.2 Зафиксировать ширину столбца на форме Access](https://i.ytimg.com/vi/wSTByGYYWLs/default.jpg)
![2.2 Поминутное автоматическое резервирование Базы данных Access](https://i.ytimg.com/vi/mF0udjHVZgA/default.jpg)