I have created a report that has about 65 dsum functions in text boxes. When the report open I get the exact same copy if I click to the next page. The only thing that is different is the report header labels aren't there. All of my dsum functions are in the detail section. None of the data is spilling over to the next sheet either. I just want the report to create one page. Where should I look to solve this problem? Thanks!
Dsum should be used in VB code not necessarily in the detail section of the form/report. I could see using it in the section summary or footer section perhaps, but I am not sure it would be valid therein.
Perhaps your solution is to create a query that tallies your results, then use report wizard to show this data from the qry.
Just to add my own opinion - it doesn't really matter where you use a DSum function (in VB or as a control Source), it should work the same.
However, 65 Dsum functions in a report should be a warning sign that maybe things aren't quite right (I'm a big fan of DSum and it's relatives, but 65 seems rather a lot). The way to think of using DSum (and the other D... functions) is a way of calculating/ deriving figures that cannot be derived from the record source (i.e. the calculation is independant of all the rest of the data around it, hence it doesn't matter whether it is VB or the record source). If you look at the arguments of a D..function - i.e. expression, domain, (optional) criteria, it is like a SQL statement without the SQl Key words ([SELECT] expression [FROM] domain [WHERE] criteria). Therefore, you should only use it to derive a value that is impossible to derive from the data contained in the record source, otherwise you are asking Access to "execute" 66 SQL statements, not 1 (not sure if it is exactly the equivelent of executing n SQL statements, but you see my point?). Having said that, it may be appropriate to do this within this particular report - just wanted to flag this as a consideration.
Anyhoo - to answer your question - you tried to use a page rather than report header?
Don't worry about Sum - I went on a long winded explanation of why so many DSums might be excessive, but if you really meant Sum then you are doing it spot on. I think I missed your point. The problem is that the report repeats for two pages not that you don't have a heading on the second page yes? Is it only one extra page or loads?
Ok: The most likely reason that information is repeated is due to group headers - do you have a group header? if so, do you have any controls in that group header and what is the field you are grouping on? In particular, are you grouping on a field of boolean data type?