Discussion Locked

Access 97 or 2K

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

In a report I would like to take the following fields from a form:
Name
Address
City
State
Zip

. . . and add them all to ONE field and keep the standard formatting of a address, for example
Name
Address
City, State Zip

I tried =[Name] & [address] & [city] & ", " & [State] & " " & [Zip]
but there must be a "carraige return before the city. Is there?

Thanks in advance!
Eric

7 replies

by awilliams3

You want to try [NAME] & chr(10) & [address] & etc.

Try [NAME] & chr(10) & chr(13) & [address] & etc. if necessary.

by mbarker734

Use:

=Trim([Name]&" "&[address]&" "&[city]& ", "&[State]&" "&[Zip])

This will place everything on one line.

If you have any questions just comment on the answer I will see it.

Good luck,

Mark

by mbarker734

Forgot you are wanting a return in there I think.

=Trim([Name]&CHR$13&[address]&CHR$13&[city]& ", "&[State]&" "&[Zip])

by mbarker734

Sorry bad thought day.

It will take three fields on your report stacked under each other to perform that. Very simular to a address label. Assuming your report query contains the needed information use the three lines below, one for each field:

=Trim([Name])

=Trim([Address])

=Trim([City]&", "&[State]&" "&[Zip])

Lining the top edge of one field with the bottom edge of the field above will cause all three fields to appear as if it they were one.

Again good luck,

Mark

by parier

What will be the difference if the TRIM was not there? What happens if I have an address in address1 and not address2, will there be a blank?

Thank you.

This discussion is closed to new replies.