moving fields in a report

  • Thread starter leahf via AccessMonster.com
  • Start date
L

leahf via AccessMonster.com

Why is it that when I want to move fields in a report they don't move in a
straight line? For example, if I have a report all set up with a line
running down from the header to the detail section, and then decide to move
the header downward to make room for extra text in the title, nothing moves
in a straight line. It is always off by a bit and difficult to straighten
out.

Any ideas?

Thanks.
Leah
 
D

Duane Hookom

What is "always off by a bit and difficult to straighten out"? Are you
referring to the line control? If so, consider using a rectangle control.
It's sides are alway vertical or horizontal. You can also set the width to 0
or height to 0 depending on the orientation of your line.

You can also add code to the On Print event of your section to draw lines
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
'The Line method could draw a rectangle rather than separate lines _
this code uses 4 lines of code to draw 4 lines around the _
Report Header Section
'draw vertical line on left
Me.Line (0, 0)-Step(0, Me.Height)
'draw vertical line on right
Me.Line (Me.Width, 0)-Step(0, Me.Height)
'draw Horizontal line across top
Me.Line (0, 0)-Step(Me.Width, 0)
'draw Horizontal line across bottom
Me.Line (0, Me.Height)-Step(Me.Width, 0)
End Sub
 
L

leahf via AccessMonster.com

Hi Duane,

I'm not at work now but your code seems so much easier. I usually draw the
horizontal and vertical lines, and when they go through header and detail
sections I match them by defining the distance from the margins in each of
the fields. Everything is then fine.

However, if I would like to move the whole "sketch" to the right or left or
up or down, I would like to just click on it and use the arrow to move it in
the desired direction. While I might use the down arrow to move it down, it
always moves it down and a very little bit to the right. Very annoying
because then the whole sketch is off and I have to define each of the lines
again. I think that using the code is easier because it should be easier to
change the distance from the margins in a code rather than going into each
field and redefining it.

Thanks once again for your help.

Leah



Duane said:
What is "always off by a bit and difficult to straighten out"? Are you
referring to the line control? If so, consider using a rectangle control.
It's sides are alway vertical or horizontal. You can also set the width to 0
or height to 0 depending on the orientation of your line.

You can also add code to the On Print event of your section to draw lines
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
'The Line method could draw a rectangle rather than separate lines _
this code uses 4 lines of code to draw 4 lines around the _
Report Header Section
'draw vertical line on left
Me.Line (0, 0)-Step(0, Me.Height)
'draw vertical line on right
Me.Line (Me.Width, 0)-Step(0, Me.Height)
'draw Horizontal line across top
Me.Line (0, 0)-Step(Me.Width, 0)
'draw Horizontal line across bottom
Me.Line (0, Me.Height)-Step(Me.Width, 0)
End Sub
Why is it that when I want to move fields in a report they don't move in a
straight line? For example, if I have a report all set up with a line
[quoted text clipped - 7 lines]
Thanks.
Leah
 

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