General discussion

Locked

Access 97 or 2K

By parier ·
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

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 97 or 2K

by awilliams3 In reply to Access 97 or 2K

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

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

Collapse -

Access 97 or 2K

by parier In reply to Access 97 or 2K

Thank you, works great!

Collapse -

Access 97 or 2K

by mbarker734 In reply to Access 97 or 2K

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

Collapse -

Access 97 or 2K

by mbarker734 In reply to Access 97 or 2K

Forgot you are wanting a return in there I think.

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

Collapse -

Access 97 or 2K

by mbarker734 In reply to Access 97 or 2K

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

Collapse -

Access 97 or 2K

by parier In reply to Access 97 or 2K

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.

Collapse -

Access 97 or 2K

by parier In reply to Access 97 or 2K

This question was closed by the author

Back to Software Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums