Jim Dettman
jimdettman at earthlink.net
Sun Sep 7 18:00:16 CDT 2003
Rocky, <<But I've got to get the number of records in the group header.>> The only way to do this is with a two pass report. On the first pass, you place code in the Group Footers OnFormat event to capture and store the total. On the second pass, you can then access that info and place it anywhere on the page. To get a two pass report, you need to reference the pages property. This forces Access to run the report once to get the total number of pages, then a second time to print everything out. The general technique is covered in this MSKB article: ACC2: How to Reset "Page of Pages" Numbering for Report Groups http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com: 80/support/kb/articles/Q131/9/37.asp&NoWebContent=1 Instead of storing the page numbers, you'll be storing the totals. Jim Dettman President, Online Computer Services of WNY, Inc. (315) 699-3443 jimdettman at earthlink.net -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Rocky Smolin - Beach Access Software Sent: Sunday, September 07, 2003 3:23 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Record Count From Group Header I think you're right about the sub-report. That would work. But I'm trying to avoid that and just get the number of records in the group header. The running sum control would work for counting the detail records in each group. But I've got to get the number of records in the group header. Maybe I'll try counting the On_Print events for group header. Thanks and regards, Rocky Smolin Beach Access Software ----- Original Message ----- From: Stephen Bond To: Access Developers discussion and problem solving Sent: Sunday, September 07, 2003 11:55 AM Subject: RE: [AccessD] Record Count From Group Header A way I know of to count the records in a Group is to put a hidden text box on the detail line. Name: txtCount ControlName: =1 RunningSum: Over Group Then the count per group (txtCount) is available in each group footer. The only way I found to put all the group counts into the *Report* footer is by using a subreport in the Report Footer which has a Totals query as its Recordsource. Stephen Bond -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Monday, 8 September 2003 4:57 a.m. To: AccessD at databaseadvisors.com Subject: [AccessD] Record Count From Group Header Dear List: Is there a way to extract the record count from a group header and put it into a control in the report footer? =Me.Count gives me the count of the detail records. =[Count] gives me the count of detail records. [GroupHeader3].[Count] gives me #Name?. I believe I've seen this syntax generated by the wizard but can't duplicate it. MTIA, Rocky Smolin Beach Access Software ---------------------------------------------------------------------------- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030907/76324b5a/attachment-0001.html>