Multiple pages of the exact same thing? What caused this?

J

J. Keggerlord

Okay, here's a goofy one. I'm running a report with my table as my report
source (with lots of fun DSum and Count functions litering the text boxes).
I have about a good 1700+ records in this table, so plenty of data to work
with.

In any case, all of the functions are working like they're supposed to and
everything looks great on the page... Until you turn to the next page and
the exact same thing opens up. What the H-E-double-hockeysticks? Any idea
why this strange little thing is happening?
 
D

Duane Hookom

How many pages do you expect? Is the record source truly just one table? Do
you really need a record source if you are using lots of DSum()s and Counts?
 
J

J. Keggerlord

Okay, I'm hip now. Pulling the record source off of the report brought it
back down to the original, intended one-page summary I was trying for.
Everything still looks good, except for all of my record count functions
returning an error. Of course, in report format, it won't tell me what this
error is, because that would be helpful. Okay, enough of my belly-aching; is
there something wrong in the syntax I have that would require it to have the
table-record source to remain attached to my report?

=Count(IIf(tblTools!Prefix="Overhead" And tblTools!Disposition="New
Tool",0,1))
 
D

Duane Hookom

If you are using Count() then you need to have a record source. I expect you
should hide the detail section and place your Count() text boxes in the
report Header or Footer sections.
 
J

J. Keggerlord

Thanks, Duane. I Actually switched 'em over to Dcount statements and seem to
be getting good results. It's a short report (only a few calculations), so
speed doesn't appear to be affected. Any disadvantage to doing this?

=DCount("[Category]","tblTools","[Prefix]='Overhead' AND [Disposition]='New
Tool'â€)
 
D

Duane Hookom

I much prefer using Count() over DCount() for efficiency. Also, a report can
be opened with a where condition applied. DCount() will ignore the where
condition while Count() will recognize the where condition.

--
Duane Hookom
Microsoft Access MVP


J. Keggerlord said:
Thanks, Duane. I Actually switched 'em over to Dcount statements and seem to
be getting good results. It's a short report (only a few calculations), so
speed doesn't appear to be affected. Any disadvantage to doing this?

=DCount("[Category]","tblTools","[Prefix]='Overhead' AND [Disposition]='New
Tool'â€)


Duane Hookom said:
If you are using Count() then you need to have a record source. I expect you
should hide the detail section and place your Count() text boxes in the
report Header or Footer sections.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top