Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

How to have a line between controls that can grow/shrink?

Hi Experts,

I have a report that looks like attached.

Would like to have a line displayed between the controls horizontally, and since controls can grow, I would like to have the line pushed down accordingly, however when no data which it will cause control to shrink, would like line to be invisible..

How can I accomplish that?

(db not in a normalized state, but that's not for now..)
Untitled.png
Avatar of Máté Farkas
Máté Farkas
Flag of Hungary image

Please draw (with Paint or something else) a picture about the desired view of that report. Provide an example when controls are shrinked / grown. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfuchs

ASKER

@Jim,
OK I applied like that
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim i As Integer
    For i = 1 To 10
        If Len(Me.Controls("Patient_Progress_Notes_" & i)) > 0 Or Len(Me.Controls("Time_" & i)) > 0 Then
            Me.Controls("line" & i).Visible = True
        Else
            Me.Controls("line" & i).Visible = False
        End If
    Next
End Sub

Open in new window


Thanks,
Ben
Avatar of bfuchs

ASKER

Thank you!