Drawing H and V lines in a 3 columns report

G

Guest

Hi there,
I have a 3 columns report which a need to draw a line in between the
columns. I was able to accomplish that with:

Dim C1, C2 as long
Const Gap As Long = 0.05 * 1440
C1 = Report.Width + Gap
C2 = C1 * 2 + Gap

Me.Line (C1, PageHeaderSection.Height)-(C1, 10000), 0
Me.Line (C2, PageHeaderSection.Height)-(C2, 10000), 0

The thing is, different users wave access to different paper sizes so, 10000
as page height does not work well. Is there a property I could use, such as
Report.Page.Height from where I could get the current page Height?

Same goes to Page Width, because printing in 3 columns, the page footer
shrink to the size of a column, instead of staying the size of a page.

Thank You

Mauricio Silva
 
M

Marshall Barton

Mauricio said:
I have a 3 columns report which a need to draw a line in between the
columns. I was able to accomplish that with:

Dim C1, C2 as long
Const Gap As Long = 0.05 * 1440
C1 = Report.Width + Gap
C2 = C1 * 2 + Gap

Me.Line (C1, PageHeaderSection.Height)-(C1, 10000), 0
Me.Line (C2, PageHeaderSection.Height)-(C2, 10000), 0

The thing is, different users wave access to different paper sizes so, 10000
as page height does not work well. Is there a property I could use, such as
Report.Page.Height from where I could get the current page Height?

Same goes to Page Width, because printing in 3 columns, the page footer
shrink to the size of a column, instead of staying the size of a page.


To get the page footer to span the page, use File - Page
Setup menu to set the number of columns, BUT uncheck the
Same as Detail box and set the column width manually. Then
you can make the report width as wide as needed.

After doing that, you will need to change the specification
of C1 to use the column width instead of Report.Width.

Access can not draw a line beyond the area available to the
event. I think you are using the Page event to run your
code. If you want to draw the lines all the way to the
bottom of the page, just make the 10000 bigger, e.g. 30000.

For more general calculations, explore using the ScaleTop,
ScaleHeight, ScaleLeft and ScaleWidth properties to see if
they provide the needed values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top