Exit Function
Восстановление_Поставки_вост_Err:
MsgBox Error $
Resume Восстановление_Поставки_вост_ExitFunction
В.6 Захист від запуску з натиснутою кнопкою Shift
Password As String
Sub Кнопка3_Click () dbs As DAO.Database, prp As PropertyError GoTo Change_Err
Const conPropNotFoundError = 3270
Password = Me.Поле1
Set dbs = CurrentDb
If Password = "noexit" Then
If dbs.Properties ("AllowBypassKey") = True Then
dbs.Properties ("AllowBypassKey") = False
State = False
Else
dbs.Properties ("AllowBypassKey") = True
State = True
End If
Else
MsgBox ("Невірний пароль")
End If
_Bye:
DoCmd.Close acForm, "ВклОтклШіфт"
DoCmd.Quit acPrompt
Exit Sub_Err:
If Err = conPropNotFoundError Then
Set prp = dbs.CreateProperty ("AllowBypassKey", dbBoolean, True)
dbs.Properties.Append prp
Resume Next
Else
Resume Change_Bye
End IfSub