Tags: access, database, detail, grow, helps, horizontal, line, lookingfor, microsoft, mysql, oracle, section, solved, sql, wasnt

Horizontal Line for Can Grow in Detail Section

On Database » Microsoft Access

1,112 words with 0 Comments; publish: Sun, 01 Jun 2008 11:49:00 GMT; (25062.50, « »)

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.

All Comments

Leave a comment...

  • 0 Comments