Blank lines in a report

S

Sparky

In Word mail merge from an Access dB there is an option not to print
blank lines. Can something similar be done on an Access report to
prevent line gaps in an envelope address

eg

address1
address2
address3
postcode

However iff address 3 is blank...

address1
address2
postcode

Tks

Sparky
 
D

Danny J. Lesandrini

You can do that a couple of ways, but it depends on how you set up the output. Do you have 4 text boxes with one
attribute each, or one text box, which displays the output of a Query calculated field?

If you have a number of text boxes, set their height to .01 inches and their CanGrow property to True. If no data
exists, the box won't grow but if it does, then they will space themselves correctly.

If you have one box, and a query calculated field, then do this ...

FullAddress: ([Address1] + vbCrLf) & ([Address2] + vbCrLf) & ([Address3] + vbCrLf)

The plus operator (+) will cause the output to be NULL if AddressX is NULL, thus negating the effect of the hard return.
The ampersand operator doesn't care about NULLs and will add up all the results for the output. Try it.
 
T

tina

in report design view, try this: set the section's CanGrow and CanShrink
properties to Yes. and set the Address3 control's CanGrow and CanShrink
properties to Yes.

hth
 
S

Sparky

In Word mail merge from an Access dB there is an option not to print
blank lines. Can something similar be done on an Access report to
prevent line gaps in an envelope address

eg

address1
address2
address3
postcode

However iff address 3 is blank...

address1
address2
postcode

Tks

Sparky


Thanks all.
 

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

Top