A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Draw continous vertical line in report detail section



 
 
Thread Tools Display Modes
  #1  
Old November 17th, 2007, 03:40 AM posted to microsoft.public.access.reports
dml
external usenet poster
 
Posts: 9
Default Draw continous vertical line in report detail section

My report has a report header approx 1.5" tall, a page header approx 0.5"
tall, followed by the detail section.

How can I print a fixed height detail section with verticle lines even if
there are only a few records? Essentially, trying to replicate a paper form.
The line starts at the bottom of the page header and continues to the top of
page footer.

In a post a couple days ago, Allen Browne recommended the below for drawing
a line down the entire page.....this close, and I am trying to figure out a
similar approach for the detail section.

Private Sub Report_Page()
Me.Line (Me.ScaleTop, Me.ScaleLeft)-(Me.ScaleTop, Me.ScaleHeight), vbRed
End Sub

Thanks,

David



  #2  
Old November 17th, 2007, 04:33 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Draw continous vertical line in report detail section

Just play with his code and hard-coded numbers like:
Private Sub Report_Page()
Me.Line (1400, 2000)-step(0, 10000)
End Sub

--
Duane Hookom
Microsoft Access MVP


"DML" wrote:

My report has a report header approx 1.5" tall, a page header approx 0.5"
tall, followed by the detail section.

How can I print a fixed height detail section with verticle lines even if
there are only a few records? Essentially, trying to replicate a paper form.
The line starts at the bottom of the page header and continues to the top of
page footer.

In a post a couple days ago, Allen Browne recommended the below for drawing
a line down the entire page.....this close, and I am trying to figure out a
similar approach for the detail section.

Private Sub Report_Page()
Me.Line (Me.ScaleTop, Me.ScaleLeft)-(Me.ScaleTop, Me.ScaleHeight), vbRed
End Sub

Thanks,

David



  #3  
Old November 17th, 2007, 11:38 AM posted to microsoft.public.access.reports
dml
external usenet poster
 
Posts: 9
Default Draw continous vertical line in report detail section

Thanks Duane. This gets me the results I want...but how can I avoid hard
coding numbers.

I can get the left coordinate by refering to the left property of labels in
the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the detail
(or bottom of the page header) and top of the page footer?


THanks again.

David



"Duane Hookom" wrote:

Just play with his code and hard-coded numbers like:
Private Sub Report_Page()
Me.Line (1400, 2000)-step(0, 10000)
End Sub

--
Duane Hookom
Microsoft Access MVP


"DML" wrote:

My report has a report header approx 1.5" tall, a page header approx 0.5"
tall, followed by the detail section.

How can I print a fixed height detail section with verticle lines even if
there are only a few records? Essentially, trying to replicate a paper form.
The line starts at the bottom of the page header and continues to the top of
page footer.

In a post a couple days ago, Allen Browne recommended the below for drawing
a line down the entire page.....this close, and I am trying to figure out a
similar approach for the detail section.

Private Sub Report_Page()
Me.Line (Me.ScaleTop, Me.ScaleLeft)-(Me.ScaleTop, Me.ScaleHeight), vbRed
End Sub

Thanks,

David



  #4  
Old November 17th, 2007, 02:07 PM posted to microsoft.public.access.reports
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Draw continous vertical line in report detail section

DML wrote:
Thanks Duane. This gets me the results I want...but how can I avoid
hard coding numbers.

I can get the left coordinate by refering to the left property of
labels in the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the
detail (or bottom of the page header) and top of the page footer?


Since PageHeaders and Footers do not grow or shrink then there should be an
exact set of coordinates that will give you what you want. There should be no
reason for them to be dynamically calculated.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #5  
Old November 19th, 2007, 02:32 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Draw continous vertical line in report detail section

If you need to replace hard-coded values, try:
sngLeft = Me.lblLev2.Left
Then us sngLeft in your Line method.

--
Duane Hookom
Microsoft Access MVP


"Rick Brandt" wrote:

DML wrote:
Thanks Duane. This gets me the results I want...but how can I avoid
hard coding numbers.

I can get the left coordinate by refering to the left property of
labels in the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the
detail (or bottom of the page header) and top of the page footer?


Since PageHeaders and Footers do not grow or shrink then there should be an
exact set of coordinates that will give you what you want. There should be no
reason for them to be dynamically calculated.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.