Count() shows #Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jimmy

    #1

    Count() shows #Error

    I hate to ask such an ambiguous question but...what are some possible causes
    of getting #Error in a text box with =Count([FieldName]) as the control
    source.

    I have a form with a text control on the form footer with the control source
    of =Count([FieldName]) and it counts all of the records on the form and
    displays 0 if there are none. I copied this form, and changed the forms
    control source, as well as those of the various fields (the field used in
    the count name is actually the same. The same field exists in both control
    source tables). I copied the form again and renamed as necessary and now the
    count control does not work. The [FieldName] corresponds to a field on the
    form! If there are records or not, I still get #Error. There is no code
    behind the form and the referenced field is included in the underlying
    controlsource query. Also, I tried puting every field in the count
    expression and using * to no avail. I've run out of ideas.

    Please help!


  • Tom van Stiphout

    #2
    Re: Count() shows #Error

    On Wed, 31 Jan 2007 00:49:53 GMT, "Jimmy" <dont@email.mew rote:

    In such cases I disambiguate, and name the control for example
    txtCountMe, and the query field CountMe.
    Then I use:
    =Count(CountMe)

    -Tom.

    >I hate to ask such an ambiguous question but...what are some possible causes
    >of getting #Error in a text box with =Count([FieldName]) as the control
    >source.
    >
    >I have a form with a text control on the form footer with the control source
    >of =Count([FieldName]) and it counts all of the records on the form and
    >displays 0 if there are none. I copied this form, and changed the forms
    >control source, as well as those of the various fields (the field used in
    >the count name is actually the same. The same field exists in both control
    >source tables). I copied the form again and renamed as necessary and now the
    >count control does not work. The [FieldName] corresponds to a field on the
    >form! If there are records or not, I still get #Error. There is no code
    >behind the form and the referenced field is included in the underlying
    >controlsourc e query. Also, I tried puting every field in the count
    >expression and using * to no avail. I've run out of ideas.
    >
    >Please help!
    >

    Comment

    Working...