Rather then use the On No Data Event, I would use the OnActivate event with the following code:
Dim strMsg As String
Dim strTitle As String
strMsg = "No Records Returned"
strTitle = "No Records Returned"
If Me.Report.HasData Then
MsgBox strMsg, vbOKOnly + vbExclamation, strTitle
DoCmd.close acReport, Me.Name
On your form where you are opening the report use:
DoCmd.OpenReport RptName, acViewPreview