Using Count(*)

  • Thread starter Thread starter carmen
  • Start date Start date
C

carmen

I created a text field with count(*) as the record source for a report in the
report footer. The report contains projects, and I am using several queries
in conjuction with it to return a report that alternatively shows all
projects, open projects, closed projects, etc.

I've tied the queries to macros on a form with command buttons to open the
various report and apply the desired filter.

For some reason, Access keeps crashing when I put the count(*) field in the
report. Any idea why this might be occurring?
 
Thanks for your response!

I am a complete newby at designing databases but got assigned the task to
build one for our office because of some familiarity with Access 2007. I've
been teaching myself from the Access for Dummies book and online resources;
have learned a lot but a long way to go.

All that to say that perhaps I've misunderstood the use of the expression.
I was under the impression the "*" in the parens would cause Access to count
all entries in the report. Do I need to put a field name in there?

golfinray said:
Count what? I usually us as the control source of the box
=count([your field name])
--
Milton Purdy
ACCESS
State of Arkansas


carmen said:
I created a text field with count(*) as the record source for a report in the
report footer. The report contains projects, and I am using several queries
in conjuction with it to return a report that alternatively shows all
projects, open projects, closed projects, etc.

I've tied the queries to macros on a form with command buttons to open the
various report and apply the desired filter.

For some reason, Access keeps crashing when I put the count(*) field in the
report. Any idea why this might be occurring?
 
I tried using the Project Number field name in lieu of the *; however, Access
still crashes.

One more (probably important) detail...the crash doesn't occur when opening
the report directly--it works fine that way. It occurs when I try to run the
macro from the form with the command buttons. The form opens but Access
crashes during the calculation of for the count.

carmen said:
Thanks for your response!

I am a complete newby at designing databases but got assigned the task to
build one for our office because of some familiarity with Access 2007. I've
been teaching myself from the Access for Dummies book and online resources;
have learned a lot but a long way to go.

All that to say that perhaps I've misunderstood the use of the expression.
I was under the impression the "*" in the parens would cause Access to count
all entries in the report. Do I need to put a field name in there?

golfinray said:
Count what? I usually us as the control source of the box
=count([your field name])
--
Milton Purdy
ACCESS
State of Arkansas


carmen said:
I created a text field with count(*) as the record source for a report in the
report footer. The report contains projects, and I am using several queries
in conjuction with it to return a report that alternatively shows all
projects, open projects, closed projects, etc.

I've tied the queries to macros on a form with command buttons to open the
various report and apply the desired filter.

For some reason, Access keeps crashing when I put the count(*) field in the
report. Any idea why this might be occurring?
 
Back
Top