Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007

    Question Unanswered: Help With Count In Forms


    I have a report which counts the number of "yes" values in the report.

    I do this by "=Count([CompTour])"

    This is great if there is data, however if a report is run when there is no data I get "#Error".

    So what you say, BUT this value is used to update another form/table etc and then I get a halt saying that "The value you entered isnt valid for this field". !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    I tried everything I can think of to set the value to "0" if there is no data and I just cant do it. It keeps saying "You cannot assign a value to this object"

    WHAT can I do guys. Please help again, and thank you for all the help in the past. You're the BEST!!!! I would be insane without all your help so far!
    Last edited by Suzywest; 01-14-07 at 07:39.

  2. #2
    Join Date
    Nov 2005
    Try this:

  3. #3
    Join Date
    Jan 2007
    Quote Originally Posted by Julita
    Try this:
    Thank you for this but it says missing ")" so I added the missing ")" so it looks like this.


    Now it says "The expression you entered has a function containing the wrong number of arguments."

    What am I doing wrong!
    Last edited by Suzywest; 01-14-07 at 17:21.

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Quote Originally Posted by Suzywest

    What am I doing wrong!
    ...not reading the Help system?
    given that you have added another closing bracket, where do you think the likely cause of your prpoblem is?

    there are several alternatives you could use for this
    one is to put in a hidden field in the report with its data source set to an appropriate value if the column = "YES"
    then COUNT() that field name

    another is to do the counting within VBA
    set a counter = 0 in each group header event
    add the value to each groupheader counter
    display the value in each group footer
    display the value in the report footer

    you could do a similar thing in the query that extracts the data for the report.
    Last edited by healdem; 01-15-07 at 05:46.
    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