You cannot modify the dimensions of a control during the Print event,
period.
Instead frae the line using the Line method of the Report object. For
sample code see the older non class based functions at the bottom of the
page here:
http://www.lebans.com/PrintLines.htm
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bill Short" <wjs@haroldbeck.com> wrote in message
news:fb35702c.0401290518.2e74ab73@posting.google.c om...[color=blue]
> I have a subreport in the detil section of my main report. The
> subreport can grow. I have a vertical line that fills the rest of the
> section. As you can probably guess I need to change the top and
> height of the line depending on the size of the subreport. During the
> OnPrint event I can capture the height of the subreport in twips and I
> already know the height that I need the detail section to be. What I
> can not do is change the top or height of the line during the OnPrint
> event. I get a "type mismatch" error.
>
> Can this be done or am I just doing it wrong?
>
> Thanks,
>
> Bill[/color]