Frame Can Grow?

Q

Question Boy

Marshall.

First I must apologize since I used the wrong terminology. I used the term
subform when in fact it is a subreport.

I am trying to dynamically adjust the size of a frame based on the size of a
subreport.

So I took your advice and switched it over to a report and got

Me.Rpt_Client_Report_Servicing_srpt.Report.Section(0).Height +
Me.Rpt_Client_Report_Servicing_srpt.Report.Section(1).Height

Which should give me the height I want, or so I thought. Regardless of the
records in the subreport it always returns the same height?!

Also, which main report event should I be using to trigger the resize of
the frame (I am a little confused on the different events even after
consulting the help on the matter)?

Thank you,

QB
 
Q

Question Boy

Marshall,

I looked back at a previous post on this very subject

http://www.microsoft.com/office/com...&p=1&tid=3a9b2e66-14ae-4be1-bd3f-d5c70d631fca

Where Duane answer this question. So I tried

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.Frame18.Height = Me.Rpt_Client_Report_Servicing_srpt.Height + 250

End Sub

For some reason thought I keep getting an error stating "can't set the
Height property in print preview or after printing has started" when i use
the Detail_Print Event.

QB
 
M

Marshall Barton

Question said:
I looked back at a previous post on this very subject

http://www.microsoft.com/office/com...&p=1&tid=3a9b2e66-14ae-4be1-bd3f-d5c70d631fca

Where Duane answer this question. So I tried

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.Frame18.Height = Me.Rpt_Client_Report_Servicing_srpt.Height + 250

End Sub

For some reason thought I keep getting an error stating "can't set the
Height property in print preview or after printing has started" when i use
the Detail_Print Event.


That means exactly what it says. Try using the Format
event, which is too soon to use the CanGrow height of the
subreport.

I could swear that I explained all that in an earlier reply.
Did you post this same problem multiple times?
 
C

Chuck

How can I have a Frame grow in size based on a subform's size?

Thank you,

QB

Not in A97. At least not without some fancy code.
How about replacing the frame with one horizontal line above and a second below
the fields inside your frame. Vertical lines on the sides will not grow. If
you absolutely must have vertical lines on each side:

See:
http://www.lebans.com/PrintLines.htm

Chuck
--
 
M

Marshall Barton

Question said:
I looked back at a previous post on this very subject

http://www.microsoft.com/office/com...&p=1&tid=3a9b2e66-14ae-4be1-bd3f-d5c70d631fca

Where Duane answer this question. So I tried

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.Frame18.Height = Me.Rpt_Client_Report_Servicing_srpt.Height + 250

End Sub

For some reason thought I keep getting an error stating "can't set the
Height property in print preview or after printing has started" when i use
the Detail_Print Event.


It seems that my earlier reply went into a black hole. What
I suggested is to make the frame invisible and use the Line
method to draw it in the section's Print event:

With Me.[the frame control]
Me.Line (.Left, .Top) - Step(.Width,
Me.Rpt_Client_Report_Servicing_srpt.Height + 250), , B
End Width
 

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