Well, first things first, it is working, that's good. acGroupLevel1Header is
a "built-in" constant in Access, its value is 5. By using 9, you have placed
the page bread in a different location. The sections are actually numbered,
its just that the built-in constants are easier to remember because of their
descriptive names. If you open the report in design mode then go to the
Immediate window (Ctrl+G) and type
?Reports!ReportName.Section(9).Name
and press Enter, it will tell you which section you placed this in.
--
Wayne Morgan
Microsoft Access MVP
Elsie said:
hi, I tried 'Me.Section(9).ForceNewPage = 1', which seems to work fine,
giving exactly what I wanted. but I don't understand the meaning of
Me.Section(9).ForceNewPage = 1 or
Me.Section(acGroupLevel1Header).ForceNewPage = 1
thanks very much for your help, Wayne
Elsie said:
ok, I took out the page break at SMN header but leave the header in and
tried 'Me.Section(acGroupLevel1Header).ForceNewPage = 1' under the on format
event for detail section, but got error message that 'section number you
entered is invalid'. so I tried Me.Section(acGroupLevel2Header).ForceNewPage
= 1 and was back to square one - where the different SMN are on the same
page.
No, it is a VBA command. Instead of opening the Builder, set the Detail
Section's Format event to [Event Procedure], then click the ...
Insert
the
code in the VBA event.
Example:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(acGroupLevel1Header).ForceNewPage = 1
End Sub
The first and last lines will be automatically created for you if you use
the method mentioned above to get to the editor.
--
Wayne Morgan
MS Access MVP
hi, I am not sure where is the place to change....
anyway, I tried adding 'Me.Section(acGroupLevel1Header).ForceNewPage
=
1',
but got a message that say 'The expression On Format you entered as the
event property setting produced the following error: The object doesn't
contain the Automation object 'Me.'.
so I tried to use the expression builder and got
Section(9).ForceNewPage=1... but I got all data printing continuously
....instead of a break at each customer....
message
What happens if you turn the page break of, but in the Format
event
of
the
detail section add,
Me.Section(acGroupLevel1Header).ForceNewPage = 1
to turn it on. This way you get through it once before it starts.
--
Wayne Morgan
MS Access MVP
ya... if i put a page break at SMN header, the first page will be
those
textboxes with no other data....but the rest of the pages are the
way
i
wanted them to be... just the first page...
perhaps i should just get the user not to print the first page?
"Wayne Morgan" <
[email protected]>
wrote
in
message
The attachment has a picture, but no explanation. The only
thing I
see
is
a
( in the wrong spot in a couple of the textboxes and a little
of
the
text
being cut off. Is this the problem?
--
Wayne Morgan
MS Access MVP
sorry, accidentally put a force new page at SDC
header....took
it
away....
now just 1 small problem ... pls refer to attachment...