Results 1 to 4 of 4
  1. #1
    boywonder is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Dec 2010
    Location
    Memphis, TN
    Posts
    60

    Count is off when using =Count

    I have a header per customer and a detail area for the customer info. I'm trying to count the number of customers per the report, but when I use the Count function, it keep counting the detail. For instance if the customer had 2 records and there were only two customers, the count would be 3. When it should be 2. Here is the function I'm using:

    =Count([FULL NAME])



    The FULL NAME is in the Header section. I was using it in the Detail area. Please HELLLPPPPPP...

  2. #2
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    I am not fully understand what you what to count either the customers or the records of the customers, use the dcount() function:

    Function:
    DCount ( expression, domain, [criteria] )
    Example:
    DCount("UnitPrice", "Order Details", "OrderID = 10248")

  3. #3
    boywonder is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Dec 2010
    Location
    Memphis, TN
    Posts
    60
    I just want to count the customers. In another report I added an unbound field in the query called Count "Count: IIf([check type] In ("P","G","O","H"),1,0)" to count check type, and it works OK, but still is off by one. It is showing 19 cx and after counting it is 20 customers. Is there an easy way to just count the customer???

  4. #4
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    I just want to count the customers.
    user count aggregate function with groupby option in the query. Where all the customers will be grouped and then will be counted.

    In another report I added an unbound field in the query called Count "Count: IIf([check type] In ("P","G","O","H"),1,0)" to count check type, and it works OK, but still is off by one. It is showing 19 cx and after counting it is 20 customers. Is there an easy way to just count the customer???
    you are mixing the IIF() function with the count function, use IIF separately and then use the count function.

    It's not clear without seeing your report and the fields,tables,query you use for the particular report. Count takes place in footer of the report, not in headers OR you should use the sub report inside the main report.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to count characters?
    By Jorge Junior in forum Access
    Replies: 1
    Last Post: 05-22-2011, 08:07 PM
  2. Record Count
    By jgelpi16 in forum Queries
    Replies: 4
    Last Post: 12-02-2010, 09:22 AM
  3. error in count
    By humpz in forum Reports
    Replies: 6
    Last Post: 08-13-2009, 08:20 AM
  4. count with conditional
    By humpz in forum Reports
    Replies: 3
    Last Post: 08-02-2009, 08:11 AM
  5. Using count or Dcount
    By ddcook in forum Access
    Replies: 0
    Last Post: 07-22-2009, 03:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums