PC Review


Reply
Thread Tools Rate Thread

Draw a vertical line

 
 
=?Utf-8?B?Sk9N?=
Guest
Posts: n/a
 
      2nd Mar 2006
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      2nd Mar 2006
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
>

 
Reply With Quote
 
=?Utf-8?B?Sk9N?=
Guest
Posts: n/a
 
      2nd Mar 2006
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
> >

 
Reply With Quote
 
Stephen Lebans
Guest
Posts: n/a
 
      3rd Mar 2006
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
>> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to draw a vertical line in subreport Coderz Microsoft Access 3 22nd Apr 2009 07:34 PM
How to draw a vertical or horizontal line in Word 2003. sheana Microsoft Word New Users 3 25th May 2008 03:14 PM
draw vertical line to mark today in diagram Florian Demmer Microsoft Excel Misc 1 22nd Jan 2008 01:31 PM
Draw Vertical line in the report Detail section =?Utf-8?B?SXJzaGFkIEFsYW0=?= Microsoft Access Reports 1 14th Aug 2007 01:20 PM
how to draw a vertical line for sections that can grow =?Utf-8?B?bWhtYWlk?= Microsoft Access Reports 1 12th Aug 2005 09:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:13 PM.