If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Get rid of blank space in page footer
I have an OnFormat event procedure in the
PageFooterSection of a report that uses the Visible Property to display the text boxes, lines, labels, etc. on the last page of a multiple page report as follows: Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer) Me![Text134].Visible = ([Page] = [Pages]) Me![Text148].Visible = ([Page] = [Pages]) Me![Label144].Visible = ([Page] = [Pages]) Me![Label145].Visible = ([Page] = [Pages]) Me![Line138].Visible = ([Page] = [Pages]) Me![Line139].Visible = ([Page] = [Pages]) Me![Box146].Visible = ([Page] = [Pages]) Me![Box147].Visible = ([Page] = [Pages]) End Sub My problem is that the pages that do not display the text boxes, lines, labels, etc. leave a large blank space when that would normally be displayed. How do I get rid of the blank space on those pages? Thanks, jrh |
#2
|
|||
|
|||
Get rid of blank space in page footer
On Thu, 20 May 2004 08:44:16 -0700, jrh wrote:
I have an OnFormat event procedure in the PageFooterSection of a report that uses the Visible Property to display the text boxes, lines, labels, etc. on the last page of a multiple page report as follows: Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer) Me![Text134].Visible = ([Page] = [Pages]) Me![Text148].Visible = ([Page] = [Pages]) Me![Label144].Visible = ([Page] = [Pages]) Me![Label145].Visible = ([Page] = [Pages]) Me![Line138].Visible = ([Page] = [Pages]) Me![Line139].Visible = ([Page] = [Pages]) Me![Box146].Visible = ([Page] = [Pages]) Me![Box147].Visible = ([Page] = [Pages]) End Sub My problem is that the pages that do not display the text boxes, lines, labels, etc. leave a large blank space when that would normally be displayed. How do I get rid of the blank space on those pages? Thanks, jrh Are these to ONLY controls is the Page Footer? If so, write down the current left and top properties of EACH control in the footer. Then arrange all the controls on one line at the top of the page footer. You can stack them on top of one another, but keep the correct left position if you can. (If you can't keep the left position, you can add code to the below event as indicated.) Then size the page footer height as short as you can. Code the page footer Format event: Cancel = Not [Page] = [Pages] If [Page] = [Pages] then Me.Section(4).Height = 4 * 1440 ' Footer is now 4 inches tall Me![Text134].Top = 0.25 * 1440 ' 1/4" from top of footer ' If you wish to set the left position also Me!Text134].Left = 0.10 * 1440 ' .10 inch from left Me![Text148].Top = 1 * 1440 ' 1 inch from top Me![Text148].Left = 0.10 * 1440 ' .10 inch from left ' etc. for the rest of the controls. End If You no longer need to set the control's Visible property to True or False as Cancel = False will not display the section anyway. The Page Footer will no longer take as much blank space on the report (just the actual height of the stacked controls), but will expand as needed for the final page. Hope this helps. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|