Printing a horizontal line at the bottom of the Detail section

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
 
T

Terry

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
 
S

Stephen Lebans

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.
 
C

Carl Rapson

Thanks, Terry. I wasn't aware that the cotrols "overlapping" would cause
that problem.

Carl
 
C

Carl Rapson

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
 
S

Stephen Lebans

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.
 
C

Carl Rapson

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.
 

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