Can you do something like
Private Sub NAME_BeforeUpdate(Cancel As Integer)
If DCount("[Field]", "TableName", "[Field] = [Forms]![FormName]![FormField]") = 0 Then
MsgBox "ID doesn't exist", vbOKOnly, "Attention!"
Cancel = True
End If
End Sub
i think that in your case
Field = BoxID
TableName...