473,386 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Vertical lines in report (code check needed)

I've adopted the code below that draws lines around six subreports on
my report...so the result is a grid effect. However, my first subform
starts to the left at 900 twips (0.625"), not 0. I can't figure out how
to realign the draw command so it starts drawing the boxes at 900 twips
to the left of 0. I've tried replacing the "0" with "900" and "0.625"
in the line with "Me.Line (lngLeft, 0)-(lngLeft, lngHeight)" and don't
get the desired results.

Any help is greatly appreciated!

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim lngHeight As Long 'store the height of tallest control
Dim i As Integer
Dim lngLeft As Long
For i = 1 To 6
'compare heights
If Me("srpt" & i).Height > lngHeight Then
lngHeight = Me("srpt" & i).Height
End If
Next
'add the height of other control
lngHeight = lngHeight + Me.txtThYear.Height
'draw the lines
For i = 0 To 6
lngLeft = i * Me.srpt1.Width
Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
Next
End Sub

Nov 13 '05 #1
1 1434
Soundneedle,
The values you'ved tried suggests you have not understood the line
object (I am not familiar with it either) If it is inches(unlikely)
you might try a negative number.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Penguin | last post by:
Using Access 97, I've created a grading sheet. To save space, the subjects are in vertical columns on a sub-report, like so: Math Spelling Reading N C T A A E U A I ...
10
by: PC Datasheet | last post by:
How do you create blank lines with lines to fill such reports as invoices and purchase orders? Thanks! Marie
3
by: Randy Harris | last post by:
I can swear I saw an answer to this a while back but can't locate it. I need to pad lines on a report (print 20 lines, even if there are only 15 records - the last 5 lines blank). Any...
1
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used...
3
by: CatMarieS | last post by:
I have been trying to get vertical lines to work in a report using VBA code as suggested by Microsoft here: http://support.microsoft.com/kb/q151543/ (except I replaced Microsoft's default line...
1
by: DuncanM | last post by:
I'm using seqlib32.dll to print bar codes on a report. But the lines are vertical, where I want the bar code lines to be horizontal. Is there any way of doing this? Duncan - thanks in advance for...
4
by: ShaneO | last post by:
In a Windows Form I have a RichTextBox with Multiline = True and ScrollBars = Vertical. As expected, when Text is loaded into the RTB the Vertical ScrollBar will appear if needed. Does anyone...
5
by: kap6770 | last post by:
I have vertical column lines which don't grow - how do I resolve this? Make a Vertical Line the Same Height as a CanGrow/CanShrink Control
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.