dogbite said:
[quoted text clipped - 24 lines]
Thanks for everyones input I'll try this and see how it works
Thanks Lee
I have 10 boxes on my report and 16 lines. This is the code I came up with.
What I am trying to do is if 2 of the boxes are <> 0 then the proper lines
conect the 2 boxes and they are visible all other boxes and lines are not
visible. I havent had time to test it all yet but what little I did test
seemed to work. It seemes like there would be a better or shorter way of
doing it .
Ideas or suggestions or do ya think it will work or just trash it and use a
pen and draw my own lines?
Either way it'll be good for a LOL
Any how it wiggles nice when scrolled.
Thanks
If Me.txtCan1 <> 0 And Me.txtPed1 <> 0 Then
ln1.Visible = True
ln2.Visible = True
ln3.Visible = True
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = True
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = True
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan1 <> 0 And txtPed2 <> 0 Then
ln1.Visible = True
ln2.Visible = True
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = True
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = True
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan1 <> 0 And txtPed3 <> 0 Then
ln1.Visible = True
ln2.Visible = True
ln3.Visible = False
ln4.Visible = False
ln5.Visible = True
ln6.Visible = False
ln7.Visible = True
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = True
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = True
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan2 <> 0 And txtPed1 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = True
ln4.Visible = True
ln5.Visible = True
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = True
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan2 <> 0 And txtPed2 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = True
ln5.Visible = False
ln6.Visible = True
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = True
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = True
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan2 <> 0 And txtPed3 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = True
ln5.Visible = False
ln6.Visible = False
ln7.Visible = True
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = True
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = True
txtCan3.Visible = False
txtCan4.Visible = False
Else
If Me.txtCan3 <> 0 And txtPed3 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = True
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = True
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = True
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = True
txtCan4.Visible = False
Else
If Me.txtCan3 <> 0 And txtPed4 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = True
ln9.Visible = True
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = True
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = True
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = True
txtCan4.Visible = False
Else
If Me.txtCan3 <> 0 And txtPed2 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = True
ln4.Visible = False
ln5.Visible = False
ln6.Visible = True
ln7.Visible = True
ln8.Visible = False
ln9.Visible = True
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = True
txtPed1.Visible = False
txtPed2.Visible = True
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = True
txtCan4.Visible = False
Else
If Me.txtCan3 <> 0 And txtPed5 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = True
ln11.Visible = True
ln12.Visible = False
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = True
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = True
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = True
txtCan4.Visible = False
Else
If Me.txtCan3 <> 0 And txtPed6 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = True
ln11.Visible = False
ln12.Visible = True
ln13.Visible = True
ln14.Visible = False
ln15.Visible = True
ln16.Visible = True
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = True
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = True
txtCan4.Visible = False
Else
If Me.txtCan4 <> 0 And txtPed5 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = True
ln12.Visible = True
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = True
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = True
Else
If Me.txtCan4 <> 0 And txtPed6 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = True
ln14.Visible = False
ln15.Visible = True
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = True
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = True
Else
If Me.txtCan4 <> 0 And txtPed2 <> 0 Then
ln1.Visible = False
ln2.Visible = True
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = False
ln10.Visible = False
ln11.Visible = False
ln12.Visible = False
ln13.Visible = True
ln14.Visible = True
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = True
txtPed3.Visible = False
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = True
Else
If Me.txtCan4 <> 0 And txtPed3 <> 0 Then
ln1.Visible = False
ln2.Visible = False
ln3.Visible = False
ln4.Visible = False
ln5.Visible = False
ln6.Visible = False
ln7.Visible = False
ln8.Visible = False
ln9.Visible = True
ln10.Visible = True
ln11.Visible = False
ln12.Visible = True
ln13.Visible = False
ln14.Visible = False
ln15.Visible = False
ln16.Visible = False
txtPed1.Visible = False
txtPed2.Visible = False
txtPed3.Visible = True
txtPed4.Visible = False
txtPed5.Visible = False
txtPed6.Visible = False
txtCan1.Visible = False
txtCan2.Visible = False
txtCan3.Visible = False
txtCan4.Visible = True
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub