Mailing Labels

G

Guest

I have used one text box to design labels and set the control source to:
=[firstname] & " " & [lastname] & chr(13) & chr(10) & [unit/flat] & " "
&[unit/flat no] & chr(13) & chr(10) & [address] & chr(13) & chr(10) etc etc.
The labels work Ok except where there is not a Unit/Flat No, then it leaves
this line blank. I have set the properties to "Can Shrink" to no avail.
Is there a way I can avoid this blank line when there is not a Unit/Flat
involved?

Thanks for you valued assistance
 
T

Terry

I have used Trim([fieldname]) in my label designs. Maybe that will cure the
'shrink' problem.
Regards

Terry
 
G

Guest

I have also used the Trim command to no avail!
Thanks anyway

Terry said:
I have used Trim([fieldname]) in my label designs. Maybe that will cure the
'shrink' problem.
Regards

Terry

Roger Bell said:
I have used one text box to design labels and set the control source to:
=[firstname] & " " & [lastname] & chr(13) & chr(10) & [unit/flat] & " "
&[unit/flat no] & chr(13) & chr(10) & [address] & chr(13) & chr(10) etc
etc.
The labels work Ok except where there is not a Unit/Flat No, then it
leaves
this line blank. I have set the properties to "Can Shrink" to no avail.
Is there a way I can avoid this blank line when there is not a Unit/Flat
involved?

Thanks for you valued assistance
 
F

fredg

I have used one text box to design labels and set the control source to:
=[firstname] & " " & [lastname] & chr(13) & chr(10) & [unit/flat] & " "
&[unit/flat no] & chr(13) & chr(10) & [address] & chr(13) & chr(10) etc etc.
The labels work Ok except where there is not a Unit/Flat No, then it leaves
this line blank. I have set the properties to "Can Shrink" to no avail.
Is there a way I can avoid this blank line when there is not a Unit/Flat
involved?

Thanks for you valued assistance

Test if [Unit/Flat] is null.

=[firstname] & " " & [lastname] & chr(13) & chr(10) & IIf(Not
IsNull([unit/flat]),[Unit/Flat] & " " & [unit/flat no] & chr(13) &
chr(10),"") & [address] & chr(13) & chr(10) ... etc.

By the way, it's nor a good idea to use the / (as well as the \) in a
Field Name. At some point it's going to come back and bite you when
you least expect it.

From Access Help:
When you name a field, control, or object, it's a good idea to make
sure the name doesn't duplicate the name of a property or other
element used by Microsoft Access; otherwise, your database can produce
unexpected behavior in some circumstances.

For instance, using /, if you neglect the brackets, Access may attempt
to divide a variable named Unit by a variable named Flat (which will
result in a division by 0 error). Similarly, don't use the Hyphen or
Asterisk in a field name.
 

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

Similar Threads

Labels 4
Mailing Address 5
Mailing Address 3
Address Label Problem 3
Address Envelope with Trim 1
Report control: hide blank row when null data 2
Address 1
Text Box in a Report 1

Top