Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / November 2005

Tip: Looking for answers? Try searching our database.

place horizontal line under detail section

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steel - 30 Nov 2005 16:42 GMT
I currently have a multiple page report that I created that I have placed
horizontal lines within.  However, I cannot seem to figure out how to place a
horizontal line under the detail section of the first page and have it
consistently connect with the border around the rest of the detail section.
I have used the line method in the on print event to create left and right
horizontal border lines around the group header and detail section using Me.
Line (0, 0)-(0, .Height) and Me.Line (.Width, 0)-(.Width, .Height) and a line
that is at the top of the report footer using Me.Line (0, 0)-(.Width, 0)......
...this works fine.  However, if I try to create a border under the detail
section by using Me.Line (0, 0)-(.Width, 0) I get lines under every record in
the section.  Right now I have tried to draw in a line at the top of the page
footer that would connect to the horizontal borders around the detail section.
The problem is that I have to continually play with the spacing in various
aspects of the report to get this border close to lining up with the
horizontal borders.  Can anyone please help with code that would avoid this
problem?

Steel
Duane Hookom - 30 Nov 2005 18:36 GMT
Do you want a line at the bottom of the last detail section on a page or in
a group? Does the horizontal line have to be at the bottom of the detail
section or can you use a large rectangle drawn in the On Page event?

Signature

Duane Hookom
MS Access MVP

>I currently have a multiple page report that I created that I have placed
> horizontal lines within.  However, I cannot seem to figure out how to
[quoted text clipped - 23 lines]
>
> Steel
Steel - 30 Nov 2005 19:24 GMT
I would like the line to be drawn after the last record in the detail section
that fits onto the first page.  By having code to draw a horizontal line in
the report footer, I have the  line that I want at the end of the report
(after the last record in the detail section of the report).  I just need a
horizontal line that shows the end of the detail section for the first page
(basically the end of the report that fits onto the first page).  At this
point I have used code to draw lines that border the group header, detail
section, and report footer to get at drawing a box that encompasses these
sections.  I figured this would be easier because my reports are multiple
pages and vary in size from the first to second page.  If there is a code to
draw a rectangle without putting separate codes in for each section and for
each horizontal/vertical line this could simplify what I am trying to do.
However, since most of my reports are multiple pages which differ in size
from the first to second page would this mean that I need to put separate
codes in for each page to fit the varying sizes?

Thanks for the reply

Steel

>Do you want a line at the bottom of the last detail section on a page or in
>a group? Does the horizontal line have to be at the bottom of the detail
[quoted text clipped - 5 lines]
>>
>> Steel
Duane Hookom - 30 Nov 2005 19:42 GMT
You can use the Top property of the detail section to kinda determine when
you are close enough to the bottom of the page that another record won't
fit. This code worked for me

Private Sub Detail1_Print(Cancel As Integer, PrintCount As Integer)
   If Me.Top > 14000 Then
       Me.DrawWidth = 10
       Me.ForeColor = vbRed
       Me.Line (0, Me.Height)-Step(Me.Width, 0)
   End If
End Sub

Signature

Duane Hookom
MS Access MVP
--

>I would like the line to be drawn after the last record in the detail
>section
[quoted text clipped - 32 lines]
>>>
>>> Steel
Steel - 30 Nov 2005 21:08 GMT
Duane,

I tried the code you gave me and it did insert a red line at the bottom of
the detail but it inserted more than one.  I tried changing the number but
was unable to only get one line at the bottome of the detail........either I
got none or more than one.  Any suggestions or thoughts on what this problem
may be?

Thanks again.

Steel

>You can use the Top property of the detail section to kinda determine when
>you are close enough to the bottom of the page that another record won't
[quoted text clipped - 13 lines]
>>>>
>>>> Steel
Steel - 30 Nov 2005 21:13 GMT
Duane,

I just tried changing the drawing width to 1 and changed the number several
times and was able to get it to work the way I wanted.  

Thanks for all of the help.

Steel

>Duane,
>
[quoted text clipped - 13 lines]
>>>>>
>>>>> Steel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.