Can Shrink - Can Grow

MikeAngelastro

Registered User.
Local time
Today, 07:16
Joined
Mar 3, 2000
Messages
254
Hi,

It's time for me to understand how these two properties really work.

First off, I have never seen "Can Shrink" work, but I have seen "Can Grow" work. What I usually do to get around this is to set both of these properties to true and then make the text box as short as possible. The result is that it grows if it contains any data. However, it seems that, if I make it too short, it won't grow. In the end, there appears to be a gap between upper and lower text boxes, when the text box in between has no data. It tends to look normal when all the text boxes have data.

My question is this: What other properties do I have set in order to get these two properties to work as I think they should. That is, when it is time to shrink, they shink to nothing and the upper and lower text boxes actually touch. Any thoughts?

Thanks,

Mike
 
Thanks Pat,

Based on your reply I played with a simplified report and learned a great deal. The results were not good for the typical sales orders, invoices, POs, etc. These are examples of when bill-to and ship-to fields are side-by-side. This pretty much negates the can-grow/can-shrink properties for these types of documents.

Any tricks you know to get around this limitation?

Thanks again,

Mike
 
Hope I'm not stepping on your toes Pat, but shouldn't it be & Chr(13) & Chr(10) & in this case?
 
Thanks Pat.

Now I am able to better format format reports.

I did bump into one more difficulty regarding these two properties. If I have two fields one above the other where one or both could be empty, the shrink does not work. The reason I have this issue is because we are using the following fields:
Supplier
Contact Name
Suite
Street
City, ST, and ZIP

Both the Contact Name and Suite fields can be empty. In this situation neither field shinks, even if both are empty.

Is this a case where I will have use your formula with the vbCRLF constant?

Mike
 
Hi,

I decided to use the formula in one can-shrink/can-grow text box. It works quite well. But I find that when the text box appears on the report - due to having data to display - it pushes all of the controls below it down by the amount of its height. I guess there is no way around this feature of reports with text boxes that can shrink or grow.

By the way the vbCRLF worked just fine.

Mike
 
One more comment:

The behavior I referred to in my previous reply caused one more gotcha. I had put a line on the report to show the user where to fold the document so that the complete address shows through the envelope's window. Guess what! When the text box in the address area grows, this line moves down the page and is no longer correctly located. I just got rid of the line.

Is there a way to make a line like this reliable?

Mike
 
Is there some reason why vbCrLf will only work in vba in my version of access?
 
No, AFAIK you can't use it directly in a controlsource of a text box.

Don't know about beyond A2k though.
 
Thanks for all of your suggestions.

From now on I will use one text box that can grow and shrink as needed. I can assemble the formula for it as I assemble a SQL statement that is based on the contents of specified fields.
 

Users who are viewing this thread

Back
Top Bottom