Microsoft Knowledge Base Email Alertz

Vertical line controls do not increase in height when you place them in a report section even if you set the CanGrow property for the section to Yes .

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 208429 - Last Review: December 12, 2002 - Revision: 1.0

ACC2000: Vertical Lines in Report Do Not Grow with Section

This article was previously published under Q208429
This article applies only to a Microsoft Access database (.mdb).

Moderate: Requires basic macro, coding, and interoperability skills.

For a Microsoft Access 2002 version of this article, see 286247  (http://kbalertz.com/Feedback.aspx?kbNumber=286247/EN-US/ ) .

SYMPTOMS

Vertical line controls do not increase in height when you place them in a report section even if you set the CanGrow property for the section to Yes.

RESOLUTION

Use the Line method to prevent broken lines if the report section grows. The following example uses the sample database Northwind.mdb to demonstrate how to use the Line method.
  1. Open the sample database Northwind.mdb.
  2. In the Database window, click Reports, and then click New.
  3. In the New Report box, click AutoReport: Columnar, click Employees in the Choose the table or query where the object's data comes from box, and then click OK.
  4. Set the OnOpen property of the report to the following event procedure:
    Private Sub Report_Open(Cancel as Integer)
       DoCmd.Maximize
    End Sub
    					
  5. Set the OnClose property of the report to the following event procedure:
    Private Sub Report_Close()
        DoCmd.Restore
    End Sub
    					
  6. Set the OnPrint property of the detail section to the following event procedure:
    Private Sub Detail_Print(Cancel as Integer, PrintCount as Integer)
        Me.ScaleMode = 1
        Me.ForeColor = 0
    
        'Repeat the following line of code for each vertical line
        '1 * 1440 represents 1 inch.
        Me.Line (0 * 1440, 0) - (0 * 1440, 14400)
        Me.Line (1 * 1440, 0) - (1 * 1440, 14400)
        Me.Line (1.9 * 1440, 0) - (1.9 * 1440, 14400)
        Me.Line (5.5 * 1440, 0) - (5.5 * 1440, 14400)
    
        'The 14400 is an arbitrary number to increase the line
        'to the max of a section.
    End Sub
    					
Preview the report. Note that the lines run from the top to the bottom of the page.

REFERENCES

For more information about the Circle method, please see the following article in the Microsoft Knowledge Base:
Q2103365  (http://kbalertz.com/Feedback.aspx?kbNumber=210365/EN-US/ ) ACC2000: How to Use the Circle Method on a Report
For more information about the Line method, click Microsoft Visual Basic Help on the Help menu, type line method in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbdta kbprb kbusage KB208429
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate