Different margins at top of page from page 2 onwards

L

Lester Lane

Hi, is there any way I can achieve this? I want Access reports to
behave a little like Word (tricky I know). My first page has our
company letter head, this is followed by various subreports that can
result in any length of report. If the report flows onto page 2 I do
not want it to start printing right at the top of the page (where I
did want the letter heading on page 1). Is there a way I can force
this down a little?

The part that will split across the page is in a subreport but I guess
I would control this from the main report. I have tried On Print and
On Format and set the TopMargin when page 2 or more but this seems to
also set page 1 too.

Thanks in advance.
 
W

Wayne-I-M

Hi

Not sure I understand this so.....

You want to print your Co logo on the 1st page but not on the rest ??
Have you tried putting in into the report header (not the page header)
 
J

John Spencer

Ok, another possible solution.
Add a New group to your report and show/hide the group based on the page
that is printing.

-- Select View: Sorting and Grouping
-- Add a top-level group
Field/Expression = 1
Group Header set to Yes
-- Close the dialog
-- Size the Group header to take up the space you need on the second
page before you start printing the information
-- On the Format Tab of the properties set Repeat Section to Yes
-- Switch to the Events tab
-- Set the GroupHeader's Format event to [EventProcedure]
-- Click on the button (three dots) at the end
-- Set the code so it looks like
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(acGroupLevel1Header).Visible = Me.Page > 1
End Sub



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
L

Lester Lane

Put your company header in the Report Header section, and size the  Page
Header section to whatever depth you want additional to the page's current
top margin for page 2 onwards.  If you are showing anything in the page
header make sure its positioned at the very bottom of the section.

In the report's properties sheet set its PageHeader property to 'Not withRpt
Hdr'.

Ken Sheridan
Stafford, England

Brilliant! It works, tho' I realise from your comments about using the
report header that I should tell you the letter head is in fact at a
grouped level as I want it for each clientID change. Anyway, it works
with some coding, as I also forgot to say I run this for many clients
at once.

John's also started me thinking. Have a header that is in effect not
linked to data and controlled by code. However, I have found with the
debug.print that some footers are "appearing" on pages they
shouldn't. Such as on the first page of a letter to a client (say
page 4 of the report, where I reset the page header to zero height) I
am getting a debug.print record for the first client! How can this be
when I have already had this on the last page of that client? There
only is one record...and this is messing up the spacing at the top of
the page (I seem to have the desired 1.2cm plus some undesired space
from who knows where)! Thanks.
 
L

Lester Lane

Its hard to say without being able to see the report in design view, but it
might be that you have some 'while space' which is wrapping onto the next
page.  Be sure not to leave any unused space below controls in a section.

Ken Sheridan
Stafford, England



Lester said:
Put your company header in the Report Header section, and size the  Page
Header section to whatever depth you want additional to the page's current
[quoted text clipped - 24 lines]
Brilliant! It works, tho' I realise from your comments about using the
report header that I should tell you the letter head is in fact at a
grouped level as I want it for each clientID change.  Anyway, it works
with some coding, as I also forgot to say I run this for many clients
at once.
John's also started me thinking.  Have a header that is in effect not
linked to data and controlled by code.  However, I have found with the
debug.print that some footers are "appearing" on pages they
shouldn't.  Such as on the first page of a letter to a client (say
page 4 of the report, where I reset the page header to zero height) I
am getting a debug.print record for the first client!  How can this be
when I have already had this on the last page of that client?  There
only is one record...and this is messing up the spacing at the top of
the page (I seem to have the desired 1.2cm plus some undesired space
from who knows where)!  Thanks.

You're right - this is such a complex report I can loose myself in it
if I'm not careful. Found a small gap at bottom of on section. Now
it is working like a dream - thanks to you all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top