开发者

ms access negative page numbers

I have an access report that generates 36505 pages (un filtered, and about half of each page is taken up by group headers and page headers) , though the footer at the bot开发者_运维知识库tom of the report page says "36505 of -29031". This looks like an overflow problem maybe, though I'm confused how it got the current page number of the last page OK, but failed to get total page count. Has anyone dealt with this before?


I found a clue on this page:

http://www.sqldrill.com/excel/access-reports/695207-access-prints-negative-number.html

But the expression wasn't 100% so I had to modify it:

="Page " & [Page] & " of " & IIf([Pages]<1,(32768-Abs([Pages]))+32768,[Pages])

Page numbers appear to be correct now. :)


In my Access 2003 report, this reports Page as Long and Pages as Integer. (I assume your report has this as the footer text box expression: ="Page " & [Page] & " of " & [Pages]) So it makes sense you're getting an apparent overflow for Pages but not Page.

Private Sub Report_Open(Cancel As Integer)
    Debug.Print "TypeName(Me.Page) " & TypeName(Me.Page)
    Debug.Print "TypeName(Me.Pages) " & TypeName(Me.Pages)
End Sub

I don't know of a work-around. I've never dealt with such a huge report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜