Option Group Frame height

Q

Question Boy

I have inserted a subreport with an Option Group Frame. The subreport is set
to grow and i am trying to make it so the frame grows along with it. As such
I am trying to see:

1. if I can determine the height of a subform
2. set the height of the frame based on item 1.

Any help is appreciated.

QB
 
Q

Question Boy

I have manged to use the following code which does enlarge the frame based on
the first record

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
srptHeight = Me.Rpt_Client_Report_Servicing_srpt.Height
Me.Frame18.Height = srptHeight + 500
End Sub

but when I goto another page within the report it is not resized based on
the current record but always on the 1st record. How can I format it on each
page independantly?

QB
 
Q

Question Boy

It was working and now it won't...???? Obviously not reliable. Anyone have
any thoughts on an alternative technique that would work.
 
M

Marshall Barton

The final height of a CanGrow control is not known in the
Format event. The flip side of the problem is that you can
not change the Height of any control in the Print event.

The way out of that Catch22 is to make the frame invisible
and use the Line method to draw a rectangle:

With Me.Rpt_Client_Report_Servicing_srpt
Me.Line (Me.Frame18.Left,Me.Frame18.Top) _
-Step(Me.Frame18.Width, .Height+500), , B
 

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