A family of Microsoft relational database management systems designed for ease of use.
This does work, but it just worries me to be burrying an error like that.
Unfortunately, the behavior of Access with event firing makes it necessary sometimes. If you want to, you can localize the suppression to just the line of code that you know may raise an unwarranted error, either by setting a flag variable to indicate where you are in the code:
Dim blnFinaliseCheck As Boolean
' ...
blnFinaliseCheck = True
If Me.finalise = True Then
With Me
.AllowDeletions = False
.AllowEdits = False
End With
End If
blnFinaliseCheck = False
... and testing that variable in your error-handling routine, or by specifying a separate error-handler for that section:
On Error GoTo Finalize_Error
If Me.finalise = True Then
With Me
.AllowDeletions = False
.AllowEdits = False
End With
End If
On Error GoTo Error_Handler
It's possible that referring to Me!Finalise rather than Me.Finalise -- bang instead of dot -- would avoid the error. I don't know, but it may be worth a try.
By the way, in my code examples I've removed the ".Form" from "Me.Form". "Me" is already a reference to the form, so there's no reason to tag on a ".Form" qualifier, though it does no harm.