Growing Vertical Lines?

eepok

Noob. Well, mostly noob.
Local time
Yesterday, 20:16
Joined
Oct 30, 2007
Messages
112
I know what you're thinking... there's a few posts on this already.

There's the "grow box"
There's this code here.
There's the Microsoft Help explanation here.

But this is all beyond me as it requires coding. I'm not against learning to code, but it's just not the best use of my time at the moment.

So I make another request of the boards:

Is there a way to make vertically growing lines in a report without coding?
 
no I you definetly would have to use vba.
 
no I you definetly would have to use vba.

Dear KeithG,

That is not the answer I wanted. /sigh. Ok, it's time to hit the books then. >.<
 
Pretty sure someone posted a code sample here about how to grow lines. I know for a fact because I had used it, but that was years back then. Try searching the forums or googling.
 
G’day eepok.

I’m reasonably sure that any method would require some code.

Perhaps if you can state what you are trying to accomplish, and why you want to do it, we may be able to offer more help.

Regards,
Chris.
 
A win for the non-coder!

I stared at the VBA code for a bit to understand exactly what it was trying to do. I stared at the grow-box explanation for a while and saw what it was trying to do and I figured it out for all of us non-coding Access abusers.

Here's what I had and what I did:

I had 3 report fields that need to vary in size as they are each expressions combining various fields.

Fallbox(contains fallcourse1, fallcourse1comp, fallcourse1notes, fallcourse2, etc.)
Winterbox
Springbox

When these 3 fields are placed side-by-side in a report and have their settings set to "can grow = yes", the larger field sets the height of the row. If you have visible borders, however, you notice that the taller field does NOT determine the height of the other fields and thus you have an ugly stepping effect. So, how do you create the illusion of a spreadsheet?

My first instinct was to make invisible borders on the boxes and insert horizontal lines at the top and bottom of the DETAIL portion of the report and look at the results. This worked great. It created all the horizontal lines as a spreadsheet would. But there were no vertical lines.

I input a vertical line equal to the height of the fields in report design mode in naive hope that access had some built in mechanic to auto-grow vertical lines. It didn't work. I played with all the settings and explored how to get it to grow via the forums and google and all I got were VBA code suggestions. (see my sig to find out why that wasn't good enough.)

In my search, I found the "grow box" which is also based in VBA. I better understood the concept of this work-around than the growing lines and that's when it clicked:

I need to make an if/then expression that would count the number of characters, compare the three fields, choose the field with the highest number of characters, and display that field again. This expression did just that:


=IIf((Len([fallbox])>=Len([winterbox])) And (Len([fallbox])>=Len([springbox])),
[fallbox],
IIf((Len([winterbox])>=Len([springbox])) And (Len([winterbox])>=Len([fallbox])),
[winterbox],
[springbox]))

I put this expression in a field on the report, set font color to "white", set it to "can grow = yes", set borders to visible, copied it twice, and place one under each of the three fields (fallbox, winterbox, springbox).

Badabing -- Growbox without coding.
 

Users who are viewing this thread

Back
Top Bottom