Print labels from Access

  • Thread starter Theodore Bartley
  • Start date
T

Theodore Bartley

Hi, I'm trying to print labels from Access. I don't understand why there is
no mention of labels in the Help, nor any mention of Trim.

I am trying to format the labels using expressions like:

=if([Country]<>""," " & [Country],"")

This gives an Error on the printout, but it doesn't give any indication of
the nature of the error. I'd appreciate some help because at present my
labels are a mess. When all the fields are present they're fine. But if
there is a field missing it leaves blank spaces.

Thanks,
Theo
 
A

Arvin Meyer

Better to do this in the query that underlies the label report use something
like:

Expr1: IIf(IsNull([Country]), "", ", ")

Then concatenate that:

=([Whatever] & [Expr1])

or:

Expr1: Whatever & (", " + [Country])

The ampersand will propogate a null the + will not. So you can use them
effectively, as above.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
T

Theodore Bartley

Hi Arvin,

Thanks for the reply. Unfortunately I don't quite know how to implement
your advice. Do I type those two expressions in SQL View or Design View? I
suppose I could use either if I knew how, but I don't. Could you add just a
couple more lines of explanation for an almost novice please. Actually I'm
pretty sure the second line can be typed in the Criteria for each relevant
field. I think it's just the Expr1 I'm struggling with.

Thanks,
Theo


Arvin Meyer said:
Better to do this in the query that underlies the label report use
something
like:

Expr1: IIf(IsNull([Country]), "", ", ")

Then concatenate that:

=([Whatever] & [Expr1])

or:

Expr1: Whatever & (", " + [Country])

The ampersand will propogate a null the + will not. So you can use them
effectively, as above.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Theodore Bartley said:
Hi, I'm trying to print labels from Access. I don't understand why there is
no mention of labels in the Help, nor any mention of Trim.

I am trying to format the labels using expressions like:

=if([Country]<>""," " & [Country],"")

This gives an Error on the printout, but it doesn't give any indication
of
the nature of the error. I'd appreciate some help because at present my
labels are a mess. When all the fields are present they're fine. But if
there is a field missing it leaves blank spaces.

Thanks,
Theo
 
Top