[AccessD] Vertical line in detail section

David McAfee davidmcafee at gmail.com
Mon Jun 20 18:14:24 CDT 2016

If you are trying to make a data grid on a report, this is how I've done it
in the past:

First, take all of your borders off of the cells in question.
Set the Textbox Control(s) CanGrow to Yes/true
Tag all of the cells in the row with something such as "grid",
 then place the following code in the report detail's OnFormat event:

Dim ctl As Control
Me.ScaleMode = 5
For Each ctl In Me.Controls
   If ctl.Tag = "grid" Then
      Me.Line ((ctl.Left / 1440), 0)-((ctl.Left / 1440), 10)
      Me.Line (((ctl.Left + ctl.Width) / 1440), 0)-(((ctl.Left + ctl.Width)
/ 1440), 10)
   End If
Next ctl

You will have to make a horizontal line above and below the row as well.
HTH David McAfee

On Sat, Jun 18, 2016 at 5:40 AM, Rocky Smolin <rockysmolin at bchacc.com>

> Dear List:
> I have a client who wants vertical lines in the detail section between data
> fields.  This is no problem when the detail section is a fixed height. I've
> done lots of those before - just make the vertical line the exact height of
> the detail section and you get a nice continuous vertical line wherever you
> want it on the report.
> Problem in this case is that there are "Can Grow" fields in the detail
> section which makes the detail height different for each detail line.
> I put a MsgBox Me.Detail.Height in the Format, Retreat and Print events to
> see if I could find out how high the section was but it always comes up
> with
> the original design height, not the height of the detail section with the
> expanded "Can Grow" text boxes.
> So is there a way to know the height of the detail section at a point where
> I could still adjust the vertical line height to fill the section?
> Rocky Smolin
> Beach Access Software
> 760-683-5777
> www.bchacc.com <http://www.bchacc.com/>
> www.e-z-mrp.com <http://www.e-z-mrp.com/>
> Skype: rocky.smolin
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

More information about the AccessD mailing list