A.D.Tejpal
adtp at touchtelindia.net
Wed Nov 19 22:15:37 CST 2003
Susan, If the RecordSource for a subreport has no data, the only event that gets fired (for the report acting as SourceObject for the subreport control) is its open event. Thereafter, for other events, the subreport behaves as if it does not exist. It would therefore be preferable to check for No Data by using DCount() function directly on the query serving as record source for the subreport. Regards, A.D.Tejpal -------------- ----- Original Message ----- From: Charlotte Foust To: Access Developers discussion and problem solving Sent: Thursday, November 20, 2003 05:16 Subject: RE: [AccessD] Page Break and SubReport Put it in the main report and set the pagebreak to Visible = the subreport's HasData property. Charlotte Foust -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Wednesday, November 19, 2003 2:31 PM To: accessd at databaseadvisors.com Subject: [AccessD] Page Break and SubReport I have a report that has a subreport. In the subreport there sometimes is data and sometimes not. When there is data, I want a page break and then the subreport. When there is not data, I want no page break and no subreport. When I put the pagebreak in the main report, I get a page break regardless of what's in the subreport. When I put it in the subreport, I still get a page break even when the subreport doesn't show because there is no data. I've tried a couple of code manipulations that look to see if there is no data and if there isn't set the subreport to invisible, but that doesn't work. Suggestions? --Susan Susan B. Geller Office of Information Systems College of Continuing Education University of Minnesota 306 Wesbrook Hall 77 Pleasant Street SE Minneapolis, MN 55455 Phone: 612-626-4785 Fax: 612-625-2568