shrink option in report

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I use Shrink option in a report that wil shrink an address field what
is not used. is there a way to but a break after all the addres details
that will stop any thing else moving up as if there are lines missing
in the addres it moves every thing else up on the invoice and messes it
all up


Thanks

Simon
 
Do you mean you use a number of Textboxes for different part of the address,
e.g. 4 boxes below:

CustomerName
AddressLine1
AddressLine2
SUBURB STATE PostCode

and says, AddressLine2 is Null, the TextBox for AddressLine2 shrinks and all
the subsequent Controls move up but you only want the "SUBURB STATE
PostCode" moves up but not other Controls?

A work-around is to use 1 single TextBox with "Can Shrink" set to No/False
and set the ControlSource of this TextBox to:

= [CustomerName] & ( Chr(13) + Chr(10) + [AddressLine1] ) &
( ( Chr(13) + Chr(10) + [AddressLine2] ) &
[SUBURB] & " " & [STATE] & " " & [PostCode]

This way, if AddressLine1 or AddressLine2 is Null, the blank line is skipped
but the height of the TextBox remains the same and subsequent Controls won't
move up.
 
If the address fields are the last thing in their section, just set the Can
Shrink property of the *section* to No. The controls will shrink, but the
section will remain fixed height.

If that's not the case, you might use a single text box for the address
panel. Don't rely on Can Shrink. Instead, use a trick to concatenate the
fields together. The trick is that there are 2 concatenation operators in
Access, and they are slightly different, i.e.:
"A" & Null produces "A"
"A" + Null produces Null

Therefore:
=[Addressee] + Chr(13) + Chr(10) & [AddressLine1] + Chr(13) + Chr(10) &
[AddressLine2] + Chr(13) + Chr(10) & ...
 

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

Back
Top