Form and Report Titles

Use the NoData event for the Report to display a MsgBox
 
Rich,
The OP wants to be able to actually print the report for historical reasons.

Rhernand,
Create a lable in the Detail area that says what you want to say when there are no records and set the visibility property to NO. Let's say the lable is named lblNoData.

Now click on the Detail bar on the report and open the properties sheet and start code in the OnFormat event. Put the following code in the event:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me.RecordSet.RecordCount = 0 Then

   Me.lblNoData.Visible =  True

End If

End Sub
See if that does what you want.
 

Users who are viewing this thread

Back
Top Bottom