Solved

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

Posted on 2008-10-01
5
160 Views
Last Modified: 2013-11-25
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
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 75
ID: 22617151
You want a 'No Data' message to appear on the report ?

mx
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 22617287
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
 

Author Comment

by:ssmith94015
ID: 22617789
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
 

Author Comment

by:ssmith94015
ID: 22617831
Cap. works perfectly.  
0
 
LVL 75
ID: 22618895
Cap post the exact code I would have posted lol.

mx
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question