Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    33

    Question Unanswered: Count Records in a filtered form??

    Hi All:

    I have a database that has several users who have difficulty with the default size of the navigation buttons. Simply because of the font size. To compensate, I created my own rendition of the navigation buttons with a size and resolution that doesn't compromise the overall look of the application.

    Works fine, looks just like the navigation buttons. What I am having difficulty with is displaying the correct number of records when I apply a filter.

    Here is the code I am using in the form's Current event. How do I modify this to display the correct number of filtered records?

    Dim str_TotalRecords

    str_TotalRecords = DCount("[AppID]", "qry_Applicants")
    [RecordNumber] = Me.CurrentRecord
    [TotalRecords] = "of" & " " & str_TotalRecords


    Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2004
    Location
    Brighton, UK
    Posts
    5
    You could try using the form's .RecordsetClone.RecordCount property.

    E.g. [TotalRecords] = "of" & " " & Me.RecordsetClone.RecordCount

    This should always return the current number of records, even when filtered.

  3. #3
    Join Date
    Mar 2004
    Posts
    33
    Originally posted by tunsted
    You could try using the form's .RecordsetClone.RecordCount property.

    E.g. [TotalRecords] = "of" & " " & Me.RecordsetClone.RecordCount

    This should always return the current number of records, even when filtered.

    Thanks a bunch tunsted. I almost had it figured out last night. I haven't used the RecordsetClone very often.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •