The following code is supposed to open a new form (Notation Final) if the query on which this form is based contains data or close this form if the query has no data. It attempts however to open the new form in either case? Assistance is appreciated.
Private Sub Form_Open(Cancel As Integer)
' An error that is special cased.
Const conErrNoValue = 2427
On Error GoTo Err_Form_Open
If IsNull(RegistrationID) Then
GoTo Err_Form_Open 'Closes current form
Else
DoCmd.OpenForm "Notation Final"
End If
Private Sub Form_Open(Cancel As Integer)
' An error that is special cased.
Const conErrNoValue = 2427
On Error GoTo Err_Form_Open
If IsNull(RegistrationID) Then
GoTo Err_Form_Open 'Closes current form
Else
DoCmd.OpenForm "Notation Final"
End If