S
Sophia
Hi: I am trying to advise the user that a subform is empty before they close
the main form. When "yes" is chosen, to not close the form, the form does
not close, but, I am getting a message " you canceled the previous
operation". On the Unload event, I have the following:
Dim intResponse As Variant
If SubfrmAssessment_Details_Admission.Form.RecordsetClone.RecordCount = 0 Then
intResponse = MsgBox("Enter an Admission Assessment", vbYesNo, "Admission
assessment is not done")
If intResponse = vbYes Then
DoCmd.CancelEvent
End If
End If
End Sub
Sophia
the main form. When "yes" is chosen, to not close the form, the form does
not close, but, I am getting a message " you canceled the previous
operation". On the Unload event, I have the following:
Dim intResponse As Variant
If SubfrmAssessment_Details_Admission.Form.RecordsetClone.RecordCount = 0 Then
intResponse = MsgBox("Enter an Admission Assessment", vbYesNo, "Admission
assessment is not done")
If intResponse = vbYes Then
DoCmd.CancelEvent
End If
End If
End Sub
Sophia