I am trying to create a gray box to help indicate a table in a report. I am
using two lines to help determine the height of the box, a rectanglte.
box01.Height = line02.Top - line00.Top
The lines are moved depending on the height of the data between them; the
"can grow" property of the text boxes is set to yes. When the report is run,
the height is calculated using the lines original positions.
I tried the On Print event trigger, but the 2191 Run Time error occurs: "You
can't set height property in print preview or after printing has started."
any ideas? thankyou
I looked at the dynamic/conditional page break post, but that was of no
help...
Thanks again!
>I am trying to create a gray box to help indicate a table in a report. I am
>using two lines to help determine the height of the box, a rectanglte.
[quoted text clipped - 7 lines]
>I tried the On Print event trigger, but the 2191 Run Time error occurs: "You
>can't set height property in print preview or after printing has started."
You can't do it that way for exactly the reason you found.
Instead, use the Print event to draw the lines and box using
the Line method:
Me.Line (txtbox.Left,txtbox.Top) - Step(0,txtbox.Height)
Me.Line (txtbox.Left,txtbox.Top) -
Step(txtbox.Width,txtbox.Height), vbBlack, BF

Signature
Marsh
MVP [MS Access]
rogge - 30 Jan 2007 18:38 GMT
Thank you very much; i did not grasp that in the other post.
> >I am trying to create a gray box to help indicate a table in a report. I am
> >using two lines to help determine the height of the box, a rectanglte.
[quoted text clipped - 17 lines]
> Me.Line (txtbox.Left,txtbox.Top) -
> Step(txtbox.Width,txtbox.Height), vbBlack, BF