Resizing a vertical line in the detail section

D

Dave C

I have a report that I want to have a vetical line go from top-to-bottom of
the page.

I'm having problems with getting this to work with controls that have
CanGrow set to true in the detail section. I need to get the line to resize
to the new height of the detail section.

I've tried the code:

me.resizeline1.height = me.height

When I put it in the detail_onprint method, I get an error:

Run-time error '2191': You can't set the Height property in print preview
or after printing has started.

If I put it in the detail_onformat method I don't get an error, but the size
of the line never changes.

Can anyone please help me figure this out? Thanks!
 
D

Dave C

Just noticed I posted the names of the functions wrong. It's detail_format
and detail_print. They're correct in the database, I just copied them wrong
 
D

Duane Hookom

Consider using a little code in the On Page event of your report. The code
might look like:
Me.Line (0,0)-(0,14400)
Me.Line (Me.Width,0)-(Me.Width,14400)
 
D

Dave C

Thanks! That did the trick.

I actually left the original lines on the report and used them as a
reference to draw the new ones.

me.line (me.resizeline1.left,0)-(me.resizeline1.left,14400)

Dave
 

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