Gary said:
I created a main report and used four groupings using the formula =1 to
create for group footers. I then placed each seperate subreport in one of
the group footers. There are now four group footers, each footer containing
one subreport. If I go under the properties for each subreport, I have
located a property field called On No Data. Do I need to write an
expression to get the main report to skip the subreport if the subreport is
blank?
No. I don't see how the NoData event will help here.
You still haven't explained what you have done to get each
section's subreport on a new page. Since you are putting
each subreport in a separate section, I will guess that you
are using the section's ForceNewPage property (instead of
using PageBreak controls).
In that case, you can cancel the entire section containing a
subreport by adding this line to each section's Format
event:
Cancel = Not Me.subreportcontrol.Report.HasData
--
Marsh
MVP [MS Access]
Please understand that I am not a professional computer programer, I am learning as I go. Your guess was correct, I am using the ForceNewPage property, and have it set to After Section so a new page is started when Access moves on to the next subreport. I am currently going into the OnFormat property and using the code builder in an attempt to use the Visual basic formula you included in your previous response. Since I am still a novice, I do not understand the "Not Me.subreportcontrol" section of the code. Is the "Not Me" section the actual subreport itselt? If so, how do I get visual basic to recognize the subreport?