Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2004, 11:17 PM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Invalid "Page of Pages"

I have a report, where I only want to print a particular footer when a condition is met. In the footer's properties "On Format" event, I have entered code that sets the footer's VISIBLE property to either True or False. When I generate this report, I see "Page 1 of 3", then sometimes, "Page 1 of 5"... in both cases the report is 4 pages long. I am guessing that Access is not taking into account, the "On Format" logic affecting the VISIBLE property... when making its first pass through the report, in order to calc the "of x" value?

Any ideas...?
 
Old October 25th, 2004, 03:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Whether or not the footer is visible, and then what page is actually showing are two different problems. First, is the footer disappearing when it's supposed to? What is your criteria? May we see the code?

Second, if it appears when it's supposed to but the numbering is wrong, then that's another issue. Remember that each time you open your report with a filter, the number of pages is supposed to change.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old October 27th, 2004, 03:19 PM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The footer is appearing when it should, and should not. The criteria for making the footer visible is based on a variable count of records within the record group. The code is as follows:

Private Sub ClientCodeFooter_Format(Cancel As Integer, FormatCount As Integer)

    If StaffCount <= 1 Then
        Me.ClientCodeFooter.Visible = False
    Else
        Me.ClientCodeFooter.Visible = True
    End If

End Sub

There is no filter involved, per se; the report is based on a query, which when I tested remained constant.

The only issue is why the "of pages" would be wrong (and sometimes different) given the input and output.

I thought there may be a correlation between the visible/non-visible footer and pages miscalculation because the report is 3 pages long with no printing of the footer and 5 pages with printing of the footer. The report actually is a combination of the two.

Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Empty Pages on "New Page Before" EMS Crystal Reports 0 November 16th, 2006 10:38 AM
The View State is invalid for this page and might ITladybug ASP.NET 2.0 Professional 0 March 1st, 2006 02:10 PM
ASP.net many pages on one page? Lofa ASP.NET 1.0 and 1.1 Basics 5 February 13th, 2006 12:59 PM
Page Breaks In Web Pages Ben Horne Dreamweaver (all versions) 5 August 8th, 2004 04:04 PM
suppress Page footer in some pages cankalu Crystal Reports 1 June 4th, 2004 10:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.