Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS Access Subreport doesn't show

Posted on 2009-05-08
6
Medium Priority
?
346 Views
Last Modified: 2013-11-28
Hi,

I have an report in access that has numerous subreports in. The first time I run it (with new data) the report works fine.

If I then close the report and run it again all the data from the subreports goes blank.

I checked the individual subreports on their own and the data is there but it just doesn't appear on the main report, any ideas why?

I've attached an excel sheet with some screen shots and explanations if this helps.

Thanks.

Report-prob.xls
0
Comment
Question by:Ritesh_Mistry
[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
  • 2
6 Comments
 
LVL 85
ID: 24334598
Are you absolutely, 100% certain that the Data for the MAIN report is consistent in these various views? That is, are you SURE that when you open the Report the FIRST time, then open it the SECOND time, that your report is using the same dataset? If your report is bound, and your report doesn't depend on a Form or Query parameters, then this likely isn't your trouble.

If not, then you may have some corruption. First, make a backup, then Decompile your database: Build a shortcut with this as the Target:

"full path to msaccess.exe" "full path to your database" /decompile

Then run that shortcut. Now open the db again, click Tools - Database Utilities - Compact and Repair. Now open the VBA editor (Ctrl + G), click Debug - Compile. Fix any errors you have, then C&R again. Finally, build a new, blank database and import everything into that new database. Compile again, fix any errors again, and see what happens.
0
 

Author Comment

by:Ritesh_Mistry
ID: 24334696
If I close the database and re-open it the report works fine first time round. It doesn't re-import any data from any external sources or anything like that.

The dataset never changes as I'm running the report off tables that are currently not updated (i've imported them rather than linking).

I have a macro that runs when the report is closed that opens a form but I can't see why this would effect the report as the form isn't linked to any tables etc.

The Main report does have a record source, but i use it to just give me the current date, week, and year.....I'll try to remove this and see what happens. I'll try the decompile you suggested if this fails.
0
 
LVL 85
ID: 24334884
How does the RecordSource update work? Is this code that's running in the Report, perhaps in the Open event, or is this driven from a query (that is, you've got a query that the report is based on, and your query gets the current date and such)?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Ritesh_Mistry
ID: 24335727
It's based on a query just like you say. The query returns date, week, and year and then the main report just displays it.

I tried removing the recordSource as it's not really required but it had no effect.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 24339034
Ritesh_Mistry,

K.I.S.S
(K)eep (I)t (S)hort and (S)imple

If you create this with just *ONE* sub report, does this still happen?
What I mean is that if you test this with one subreport, and it works, then add one subreport at a time until it fails.
Why add 12 subreports all at once, and try to troubleshoot a massive 12 subreport system?

On the other hand, if it fails with one subreport, then don't add any more reports.
Fix the current report.
It will be a lot easier to troubleshoot one Main Report and one Sub Report that it will be to troubleshoot a Main Report with "numerous" Sub-reports.
Make sense?
;-)

As you can see, the first question is:
Did this report ever work?

Keep us posted

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34051847
;-)
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

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 …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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