Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    8

    Unanswered: Count distinct values of a field in a search form

    I would like to count distinct values on a control in the footer of a search form. The search result is based on the filtering criteria in the header of the form. Can someone guide me how to accomplish it. Thanks!

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    make a query that does the uniqe count...say: qsSearchUniq,
    then the text box setting:
    txtBox.rowsource = Dcount("*","qsSearchUniq")

  3. #3
    Join Date
    Aug 2012
    Posts
    8
    Quote Originally Posted by ranman256 View Post
    make a query that does the uniqe count...say: qsSearchUniq,
    then the text box setting:
    txtBox.rowsource = Dcount("*","qsSearchUniq")
    That is good idea to find out the distinct values of field in the table. However, I need to do some search in the search form and count the distinct value of the field within the search result, not the field of the table before the search. Should I change the recordset of the query to the form but I am unsure the syntax of the form recordset.

Posting Permissions

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