Horizontal Line for Can Grow in Detail Section

K

Karin

Hi, This solved my problem but it wasn't under a topic name I was looking
for. Hope this helps someone else.

I needed a horizontal line to show at the end of a detail section that
contained two text boxes set up to shrink or grow. A line placed in the
detail section without using this code will not move as the text boxes resize.

Add a horizontal line to the bottom of the detail section. Name the line
"LineGrow" (or whatever you want).

Add an unbound text control to the detail section.
Set it's control source to:
=1
Set it's RunningSum property to
Over All
Name this control "txtCountRecs"
You can make it not visible if you don't wish show the line number.

Code the detail On Format event:
Me![LineGrow].Visible = Me!txtCountRecs Mod 1 = 0

(View the properties of the detail section, choose the Event tab, in the On
Format section choose [Event Procedure]. Place the above line of code there.)

By changing Mod 1 to Mod 2, a line will print every two records instead of
every one.)

Thanks to Fred G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top