[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Can't get blank record sub-reports to show in Access 2010

Posted on 2013-05-14
2
Medium Priority
?
1,279 Views
Last Modified: 2013-05-14
I have a main report that is a container which holds sub reports run by separate queries.

If a sub report has no records it doesn't show up in print preview, only in report view and therefore exports to pdf with missing sub- reports.  The sub-reports are designed to show the message "Nil report" which is important for our auditing process.

I have gotten around this problem in other reports by creating queries which creates fake records...but statusing them and then deleting these records become a nightmare to manage and I figure there must be a better way.

I read the following solution from a similar question, but can't get it to work because I don't understand what to put where:


You can also use the subreport's .HasData property. For example, create a textbox (also with .CanShrink) with this expression:

    = IIf(subObject.Report.HasData,Null,'No Data!')

This will show the message instead of the empty report.

Any help on the above or a different solution would be appreciated.
0
Comment
Question by:grmcra
[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 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39165903
try changing this

  = IIf(subObject.Report.HasData,Null,'No Data!')


with


  = IIf(Report![NameofsubReportControl].Report.HasData,Null,'No Data!')




NameofsubReportControl is the name of the control holding the subreport.
0
 

Author Closing Comment

by:grmcra
ID: 39165951
Awesome, thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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: …

650 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