Reports and positioning of manual Page breaks

G

Guest

Hi

I have a report in Access 2000. Sometimes one part of the report is at the
bottom of the page and I would like to force it onto the next page. Because
of the format of the report, the 'force new page' options' aren't useful to
me as the section has 3 separate textboxes and labels that I don't want to
join together because of formating.

So I have tried using the report.top property and object.top to force page
breaks. But I just can't get it to work.

This is what I have been up to:

If me.pagebreak1.top > 8000 then ' where 8000 is in twips
me.pagebreak1.visible=true
else
me.pagebreak1.visible=false
end if


Also, each textbox in the section could go over the page, so I need three
separate potential forced breaks.

Where have I gone wrong?

Thanks

Leonard
 
A

Allen Browne

Presumably you want each of the 3 controls in your section to stay together,
but not necessarily all three. (If you don't care, you could try setting the
sections Keep Together property to No.)

To do that, you need to put the 3 controls in different sections. Open the
Sorting And Grouping Dialog (View menu.) Choose your primary key field, and
in the lower pane of the dialog set the Group Header and Group Footer to
Yes. This gives you 2 new sections that appear for every record (becuase
it's the primary key). Move the first control into the group header, and the
last one into the group footer.

Now you can put page break controls in each section, and use the Top
property of the *report* (not the control) to see how far down the page this
section is being placed during its Format event.
 
G

Guest

Hi Allen

Thanks for that reply. I guess I didn't make it as clear as it should be.

I don't necessarily want the 3 text boxes to stay together. Therefore, there
could be 1 on one page and 2 one the other, or, 2 on one page and 1 on the
other, or 3 on one page.

Leonard
 
G

Guest

Thanks Allen, will do that tonight.

Did you watch the world cup qualifier match last night?

Leonard
 

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

Similar Threads


Top