Hello all,
I have searched far and wide for a solution to this problem but have yet to find one. So if it has been covered already, I apologize.
I am trying to mimic a state form with a report. Each page of this form has a total of 10 lines. I want my report to print the records that would be on each line and if there are less than ten, print additional lines to fill the page and if there are more than ten, create a new page or pages with exactly ten lines on each.
I have no problem with getting it to work when there are less than 10, using this example http://support.microsoft.com/kb/119073. However, when printing more than ten, it prints the exact number of records but no additional blank lines if the last page has less than 10 records on it. I realize that the example is not meant to accommodate this scenario, so I have tried various ways of tweaking the code.
Rather than using:
ElseIf TotCount > TotGrp And TotCount < 10 Then
I've tried:
ElseIf TotCount > TotGrp And (TotCount Mod 10) <> 0 Then
And:
ElseIf TotCount > TotGrp And (TotCount Mod 10) > 0 Then
and different variations.
However, these modifications do not change the result of how my report is printed. Again, if there are less than 10 lines, it will print additional lines to fill the page, but if there are more than 10, it will only print up to the last record. For example if, I have 12 records, it will print 10 on the first page and 2 on the next. That's it. In the case of this example, I want it to print the 10 on the first page then the 2 on the second page and print an additional 8 blank lines to fill the second page.
Thanks in advance for any help with this.