Printing a horizontal line at the bottom of the Detail section

  • Thread starter Thread starter Carl Rapson
  • Start date Start date
C

Carl Rapson

I would like to print a horizontal line at the bottom of my Detail section.
The problem is, I have several fields set as Can Grow in the Detail section.
Consequently, the Detail seciton can be of varying height. I've tried the
Line method:

Me.Line (0, Me.Section(acDetail).Height)-Step(Me.Width, 0), vbBlack

But this always draws a line at the default Detail section height (the
height I see in Design view), not the actual (runtime) Detail height. How
can I draw a line at the bottom of the Detail section when the section
height keeps changing?

Thanks for any information,

Carl Rapson
 
Carl,

In design view draw your line at the bottom of the detail
section and ensure none of the "growing" controls overlap
vertically with the line. No need for any code.

HTH

Terry
 
Place your code in the Print event and change the reference from:
Me.Section(acDetail).Height
to
Me.Height

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks, Terry. I wasn't aware that the cotrols "overlapping" would cause
that problem.

Carl
 
Thanks, Stephen, that worked. I've been drawing lines in the Format event,
and everything worked except for this one problem. Should line drawing take
place in the Print event instead?

Carl
 
In CanGrow/Shrink situations, the final height of the control/section is
not available until the Print event. So as you suggested, all calls to
the Report object's Line/Print etc methods should happen in the
section's Print event.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks, that's good to know.

Carl

Stephen Lebans said:
In CanGrow/Shrink situations, the final height of the control/section is
not available until the Print event. So as you suggested, all calls to
the Report object's Line/Print etc methods should happen in the
section's Print event.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top