Detail Section height by formula

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Is it possible to set the height of the detail section by a formula so that the
height is a variable depending on the inputs to the formula?

Just a wizard prodder
Chuck
__
 
Can you be more specific or provide some examples? "depending on the inputs
to the formula" has little or no meaning to me and possibly others.

Maybe you should state why you think you need to do this.
 
Chuck said:
Is it possible to set the height of the detail section by a formula so that the
height is a variable depending on the inputs to the formula?


Setting the Height of the Detail section in its Format event
was a new feature in AXP, but it is very rarely used. The
CanGrow property takes care of the usual situations.
 
On Wed, 13 Jul 2005 22:04:52 -0500, "Duane Hookom"

I want to be able to set a variable number of detail sections that will be
printed on a page so that I can use the same report for multiple situations. I
thought that te easiest way to do this would to be able to set the detail
section height to a fixed value for each case. At worst, I can make a field
for the detail height, but the field would still have to be read. I know the
number of detail sections for individual reports and I can make a formula that
calculates how high the section should be to just fill the page.

I'm using A97 and the height property will only accept a simple number value.
Can you be more specific or provide some examples? "depending on the inputs
to the formula" has little or no meaning to me and possibly others.

Maybe you should state why you think you need to do this.

And to me, top posting makes more sense.
Usually I don't need to see all the previous posts to know what has been going
on. If I do, then I can scan down. Bur I hate to scan down thru half a dozen
long replys to see "thank you". To those who want to reply to the top posting
statement, please use big snips where appropriate.

Just a wizard prodder
Chuck
--
 
If your detail section contains 10 records, you would like to see:

Record1
Record2
Record3
Record4
...
Record10

and if you had 5 records, you would want to see:

Record1

Record2

Record3

Record4

Record5

Three records would result in approximately triple-spacing? Is that correct?
 
On Thu, 14 Jul 2005 11:17:44 -0500, "Duane Hookom"

Absolutely correct. I know it's weird. It's not worth much effort. I'm the
only one who uses the database.

Just a wizard prodder
Chuck
 
You might be able to count the number of records in a group on a page by a
text box in a header with a control source of:
=Count(*)
You can then use this count to divided into a max number of lines to get the
number of "Lines" per record. Then add a text box in the detail section that
uses the String() function with the number of lines per record. Make sure
the text box can grow and every character added by the String() function
causes the text box to grow. This will push your detail section taller.

--
Duane Hookom
MS Access MVP


Chuck said:
On Thu, 14 Jul 2005 11:17:44 -0500, "Duane Hookom"

Absolutely correct. I know it's weird. It's not worth much effort. I'm
the
only one who uses the database.

Just a wizard prodder
Chuck
--
 
On Thu, 14 Jul 2005 21:27:39 -0500, "Duane Hookom"

Thanks Duane, This looks promising. I'll play with it for a while and let you
know it worked out.

Just a wizard prodder
Chuck
--
 
On Thu, 14 Jul 2005 21:27:39 -0500, "Duane Hookom"

I thought I sent this message on the 16th, but it hsen't shown up here yet.
So I'll give it another try.

Blame my age for asking about a formula instead of an equation.

The string() works like a charm. I couldn't get the count() to work, but the
number of lines per record is set in the underlying table so is already
available in the query. The text box control source is:
String(INT(0.5+63/[rpp]{records per page},"A").
The width of the text box is set to: 0.0007 so the A does not print.

The constant 63 is a function of the record font and the string font,
Arial 8 and 6 respectively. The whole thing falls apart above 10 records per
page. Even making the String font much smaller doesn't get much beyond the 10.
The curve is pretty well flatened out by then and the String function requires
an integer. Unless the text box is very short, you don't have much room to
work with. (2 points off for ending with a preposition)

Maybe I'll play with replacing the A with a period and see if I can make the
String text box much shorter. However, 10 is probably the most records per
page I'll ever want.

Thanks for your help.

Just a wizard prodder
Chuck
--
 
Back
Top