Use the Print event instead of the Format event. Use Me.Height to get the
current Height of the Section.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"JOM" <(E-Mail Removed)> wrote in message
news:F14085E9-46B5-4596-A30B-(E-Mail Removed)...
> Karl, thanks for the response, however that is not what I was looking
> for....
> My line is drawn by code, I have a post "Empty line in a report" That Ken
> helped me alot. the part that I got stuck was the setting of the value of
> the sngHeight variable in the detail section's Format section so that it
> varies depending on whether the second address line is Null or not.
>
>
> "KARL DEWEY" wrote:
>
>> Open the report in design view, click on the tool box and Line. position
>> the
>> line where you want it. I have not gotten a line to grow. You might
>> try a
>> solid line border for your object.
>>
>> "JOM" wrote:
>>
>> > A part of my report looks like this
>> > _________________________________________________________
>> > John smith |
>> > 123 Address line 1 |
>> > P.O Box Address line 2 |
>> > Las Vegas, NE 14785 - 0000 |
>> > _______________________________|___________________________
>> >
>> > The following draws my vertical line where I want it to draw. But
>> > sometimes
>> > the address line 2 does not exist so that means the vertical line will
>> > be
>> > longer than needed how do I format the report so that If I have 1 or 2
>> > address lines the vertical line will be propotional to the report....
>> >
>> >
>> > Sub DrawLine()
>> >
>> > Dim lngColor As Long
>> > Dim sngHeight As Single
>> >
>> >
>> > ' Set scale to twips
>> > Me.ScaleMode = 1
>> > ' Set line width in pixels
>> > Me.DrawWidth = 5
>> > ' Set height to artificially high value
>> > sngHeight = 1980
>> > ' Make colour black
>> > lngColor = RGB(0, 0, 0)
>> > ' Draw line 3.86 inches in from left margin
>> > Me.Line (5572, 50)-(5572, sngHeight), lngColor End Sub
>> >