Mailing Labels

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
I have used Trim([fieldname]) in my label designs. Maybe that will cure the
'shrink' problem.
Regards

Terry
 
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
 
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.
 
Back
Top