> I have a report where the zip codes are based on a input mask that
> includes the hyphen. When I print 5 digit zip codes the hyphen is
[quoted text clipped - 3 lines]
> My error may be in my parenthesis but I have not been able to see it.
> Any help would be appreciated.
You use Len() twice but only the second one had the parenthesis.
You can also combine the comma and the space after the
City (& "," & " " &) into one & ", " &
You need to enclose the =Trim([City] field within it's own set of
parenthesis =Trim([City]) & etc.
Try:
=Trim([ShippingCity]) & ", " & [ShippingState] & " " &
IIF(Len([ShippingPostalCode])>6,[ShippingPostalCode],Left([ShippingPostalCode],5))

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
epete367@optonline.net - 21 Oct 2005 21:26 GMT
Since I posted I have changed to using one control for an address block
to suppress blank lines. It now reads:
=([MailingName]+Chr(13)+Chr(10)) & ([CompanyName]+Chr(13)+Chr(10)) &
([ShippingAddress1]+Chr(13)+Chr(10)) &
([ShippingAddress2]+Chr(13)+Chr(10)) & [ShippingCity] & "," & " " &
[ShippingState] & " " & " " &
IIF(Len([ShippingPostalCode])>6,[ShippingPostalCode],Left([ShippingPostalCode],5))
At this point, Preview prompts me to 'Enter Parameter Value'
ShippingPostalCode
If, however, I use:
=([MailingName]+Chr(13)+Chr(10)) & ([CompanyName]+Chr(13)+Chr(10)) &
([ShippingAddress1]+Chr(13)+Chr(10)) &
([ShippingAddress2]+Chr(13)+Chr(10)) & [ShippingCity] & "," & " " &
[ShippingState] & " " & " " & [ShippingPostalCode]
everything looks right except for my hyphen.
Thanks for your assistance. I have managed to confuse myself!