Results 1 to 4 of 4

Thread: Count

  1. #1
    Join Date
    Apr 2012
    Posts
    9

    Unanswered: Count

    Can someone tell me why this is counting records with a value of zero.

    =Count([quantity_local]>0)

    It is the record source for a textbox.

    Thank you!

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    You're trying to use a 'Where' clause, here

    (Where) [quantity_local]>0

    and the Count() Function doesn't allow for this!

    If your goal is to find out the number of Records where [quantity_local]>0, you need to use DCount().

    Code:
    =DCount("*", "YourTable/QueryName", "[quantity_local]>0")

    If your intention is something else, you need to explain your goal in clearer language.

    Also note that a Textbox doesn't have a 'record source,' Forms and Reports do. Controls, such as Textboxes, have Control Sources.

    Linq ;0)>
    Last edited by Missinglinq; 01-19-13 at 17:28.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Apr 2012
    Posts
    9
    Thank you, I will copy this to my notes for the project. I am not at work so I can not try it. Also we can not access this forum from work because the security Nazi's has blocked ALL forums. Security +1 - Productivity 0

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by Kaw4Life View Post
    Thank you, I will copy this to my notes for the project. I am not at work so I can not try it. Also we can not access this forum from work because the security Nazi's has blocked ALL forums. Security +1 - Productivity 0
    well in which case invest in some good reference books for Access such as the Sybex Access Developers handbooks
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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