I have a report in Access containing 4 sub reports in the detail section. One of the subreports is actually an OLE object that I show/hide (using code) based on a value returned in the report query - a flag off/on based on participation in a program. I have the particular object hidden on report load and becomes visible if the flag is on. That's all working fine. BUT this object is also causing a blank page to print after the records where the flag is 0 (no flag = no participation).
I have gone through all the sub reports and main report page setups, margins, page width and length, resized all the detail sections, etc. - this is not the problem.
If I delete the OLE object the report does exactly what it should with no blank pages which leads me to believe that the OLE object makes the detail section of the report just enough too long causing the blank page.
Since not having the OLE object on the report is not an option I have another thought. Is there a way to begin with the OLE object not even on the report but actually add it if the flag is on? OR code in VBA to delete blank pages?
If the object is an image, I might have an ugly but useful work around:
1. Put the image in the page footer.
2. Bind the image subform to a query that returns 1 record when true and no record when the condition is not met.
One record per subform is a bit pricey but it works...