Returning the windowheight of a subreport

D

DanWH

I need to adjust the height of a text box that is adjacent to a subreport in
the detail section of the main report for each instance as the report is
generated. What I've tried doing is below:

Dim height as integer
height = reports.item("subreport").windowheight
me.textbox.height = height

With that I got a can't find report error.

I was then told to change the code to this:

Dim height as integer
height = Reports("NameOfReport").Item("Subreport").windowheight
me.textbox.height = height

However with that I received an application defined or object defined error.
I've tried different versions but can't get it to work. What I basically
need is a way to get the windowheight of a subreport that is embedded in the
main report.

I am using the name of the subreport control on the report and not the name
of the report that the sub report is based on.

Please help
Dan
 
S

Stephen Lebans

I think you would be better off using the Line method of the Report object
to render the border of the TextBox control yourself 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