• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

Need to display the text "NO DATA" on a report that has no records

My user wants to have the replace say "No Data" on it when there are no records to report, not just get a message that no data is available, they need an actual report that indicates so.  So, how do I change the underlying query for the report when there is no data to report on?
0
ssmith94015
Asked:
ssmith94015
  • 2
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You want a 'No Data' message to appear on the report ?

mx
0
 
Rey Obrero (Capricorn1)Commented:
create a label with caption "NO DATA", set visible property to NO

in the report Nodata event show the label

private sub Report_NoData(Cancel As Integer)

Me.lblNoData.Visible = True
End Sub

0
 
ssmith94015Author Commented:
Yes, I need a message on the report that indicates there is no data for the report.  I am going to try Cap's suggestion.  Be right back.
0
 
ssmith94015Author Commented:
Cap. works perfectly.  
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Cap post the exact code I would have posted lol.

mx
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now