Try this: It won't clutter your form with textboxes.
This function will show a message box indicating the number of records returned by the report query. It will return true if the recordcount of the report query is greater than zero.
It will return false if the user clicks Cancel or the recordcount of the report query is zero.
Call the function before opening the report, supplying the query name as the parameter.
If the function returns TRUE, open the report.
You can put this query in the form's code or in a module if it will be needed by more than one form.
Code:
'---------------------------------------------------------------------------------------
' Procedure : fcnCountOK
' DateTime : 7/9/2014 16:41
' Author : davegri
' Purpose : Count number of records returned by a SELECT QUERY
' and display the result in a message box
'---------------------------------------------------------------------------------------
'
Function fcnCountOK(qQuery As String) As Boolean
Dim reccnt As Long, intMsgBox As Long
On Error GoTo fcnCountOK_Error
fcnCountOK = True
reccnt = DCount("*", qQuery)
intMsgBox = MsgBox("This selection will process " + Str(reccnt) + " records", _
vbOKCancel, " R E C O R D S T O P R O C E S S ")
If reccnt = 0 Or intMsgBox = vbCancel Then
fcnCountOK = False
End If
fcnCountOK_Exit:
Exit Function
fcnCountOK_Error:
Msgbox Err.Number & ", " & Err.Description & ", in fcnCountOK"
Resume fcnCountOK_Exit
End Function