Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Thu Aug 20 12:00:23 CDT 2009
I approach this from the other end: I *define* how many rows will be displayed by using this little routine.... Sub SetFormRows(f As Form, nRows As Integer) Dim nFormFinalHeight As Long Dim nSectionHeight As Long On Error Resume Next nSectionHeight = f.Section(acHeader).Height If Err.Number <> 0 Then nSectionHeight = 0 Err.Clear End If nFormFinalHeight = nFormFinalHeight + nSectionHeight nSectionHeight = (f.Section(acDetail).Height * nRows) If Err.Number <> 0 Then nSectionHeight = 0 Err.Clear End If nFormFinalHeight = nFormFinalHeight + nSectionHeight nSectionHeight = f.Section(acFooter).Height If Err.Number <> 0 Then nSectionHeight = 0 Err.Clear End If nFormFinalHeight = nFormFinalHeight + nSectionHeight f.InsideHeight = nFormFinalHeight On Error GoTo 0 ' turn normal error trapping back on End Sub And I call the routine in the form's Load event... SetFormRows Me, 10 Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, August 20, 2009 12:52 PM To: Access Developers discussion and problem solving Subject: [AccessD] determine count of records displayed in continuous form Is there a way to determine the count of records displayed in a continuous form. By this I mean the number of records actually showing, not the count in the recordset behind the form. I don't believe I have ever seen a way to do this but I thought I'd ask. -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com