Determining control’s position on a report

C

Cheryl

I have a letter set up in a report that has three sub reports. These sub
reports vary in size and have the grow/shrink properties set to yes. After
the sub reports, in a group footer, I have the remainder of the letter and in
the report footer there are some footnotes.

This letter could sometimes be two pages in length, or more occasionally.
The first page is printed on letterhead. The problem I am having is
determining when the control’s in the group footer/report footer fall on the
first page. If they fall on the first page, I would like for those controls
to be indented.

Can anyone give me some pointers on how to determine the control’s position
(if it’s on page 1 or on page 2)?
 
J

John Spencer

Do you print only one letter at a time?
If so, the simplest way to determine the page number is to use the reports
Page property in the format event of the relevant sections.


If Me.Page = 1 THEN
Me.txtDate.Left = 1*1440 '1440 twips to the inch
Me.txtSecondControl = 2.5 * 1440
Else
Me.txtDate.Left = 1 'at the left edge of print area
Me.txtSecondControl = 1.5 * 1440 '1.5 inch from the left margin
End if

If there are a LOT of controls, you can loop through ALL the controls and move
them left or right by an offset amount instead of using a fixed figure.

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

Cheryl

Thank you so much John, this is exactly what I was needing. Yes, the letter
is printed one at a time. This is a very small database set up to determine
service privileges of staff members, whether they are in need of
credentialing or training to provide a service.

I appreciate the help that you and the other MVP's provide. I search this
group often when I need help.
 

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