Controlling appearance of a line

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. This is an odd one but perhaps theres a very easy solution.

I have a report with a subreport. I want to be able to have a line appearing
between the subreport records but not at the top of the first one and not at
the bottom of the last one. Nor do I want a line appearing if no Subreport
info is shown.

Is there a way of doing this?

Thanks in advance, Leon
 
Leon said:
I have a report with a subreport. I want to be able to have a line appearing
between the subreport records but not at the top of the first one and not at
the bottom of the last one. Nor do I want a line appearing if no Subreport
info is shown.


Add a line control named lnSeparator to the top of the
subreport's detail section.

To hide the line at the top of the first record, add an
invisible text box named txtLineCnt to the detail section.
Set its control source expression to =1 and RunningSum
property to Over All. Then add a line of code to the detail
sections Format event procedure:
Me.lnSeparator.Visible = (Me.txtLineCnt >1)
 
Thank you Marsh. Ive just done as you suggested and it works perfectly. Just
one slight hiccup. When I tried to enter the code as you said, Access changed
InSeparator to Inseparator. I had to change the name of the line to
Inseparator to get it to work. This is strange, but then Ive probably not
used a capital letter in the middle of a name in code before.

Thanks again, leon
 
You probably created the line control's name without the
capital S. Access tries to fix capitalzation of references
to match what was used in the declaration. It really
doesn't matter, but it can be annoying when it doesn't do
what you expect.
 
Thanks again Marsh.

Leon

Marshall Barton said:
You probably created the line control's name without the
capital S. Access tries to fix capitalzation of references
to match what was used in the declaration. It really
doesn't matter, but it can be annoying when it doesn't do
what you expect.
--
Marsh
MVP [MS Access]

Thank you Marsh. Ive just done as you suggested and it works perfectly. Just
one slight hiccup. When I tried to enter the code as you said, Access changed
InSeparator to Inseparator. I had to change the name of the line to
Inseparator to get it to work. This is strange, but then Ive probably not
used a capital letter in the middle of a name in code before.
 
Back
Top