Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Report that looks like a Spreadsheet (XP/2K)

    IS there an easy way to create a report that looks like a spreadsheet in Access. I always get messed up trying to line up the lines between the column headers in the page header and the lines between the fields in the detail section. IS there an easy way to do this?
    thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report that looks like a Spreadsheet (XP/2K)

    What method do you use to draw lines?

    If you want to position vertical lines at specified positions, you could use this custom function, to be placed in a standard module:

    Private Const Inch = 1440

    ' Draw vertical line at xPos(i) inches from left margin. Covers entire section.

    Function DrawLines(R As Report, ParamArray xPos())
    Dim i As Integer
    For i = LBound(xPos) To UBound(xPos)
    R.Line (xPos(i) * Inch, 0)-(xPos(i) * Inch, 22 * Inch)
    Next i
    End Function

    You can set the On Print property of each section that needs vertical lines to an expression like this:

    =DrawLines([Report],1,2,4.5,5.5)

    This will draw vertical lines at 1", 2", 4.5" and 5.5" from the left margin.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report that looks like a Spreadsheet (XP/2K)

    will this draw them both in the detail and in the header section?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report that looks like a Spreadsheet (XP/2K)

    You will have to enter the expression =DrawLines(...) in the On Print event of each section where you want the vertical lines to appear. See attached zipped Access 97 database.
    Attached Files Attached Files

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report that looks like a Spreadsheet (XP/2K)

    Spreadsheets aren't the loveliest of things. Is there a reason why you want to recreate this look in Access?
    Charlotte

  6. #6
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report that looks like a Spreadsheet (XP/2K)

    The system I working on outputs instructions to workers in the field. They prefer everything in a grid so they do not make a mistake and transpose the different fields. They are short 1 or 2 letter fields describing where to do construction work.
    Thanks HAns for the code

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report that looks like a Spreadsheet (XP/2K)

    I just found this, haven't checked it out, thought it might be useful, if it is as good as it appears, please let me know.

    PrintLinesClass - Create Vertical lines, Borders and boxes with the addition of a simple to use Class to your project

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •