Silly report question

D

dgrdinh

Simple question in making a report.

I have 4 fields address, city, state, zip. In my report I have a text
box. I would like to combine the fields into the correct format:

Yadi Street, fountain valley, ca 92708

But I dont know how to do the combine. Do I need to use seperate text
boxes? that seems stupid. Is there some way of doing format strings?

thanks
 
R

Rick Brandt

Simple question in making a report.

I have 4 fields address, city, state, zip. In my report I have a text
box. I would like to combine the fields into the correct format:

Yadi Street, fountain valley, ca 92708

But I dont know how to do the combine. Do I need to use seperate text
boxes? that seems stupid. Is there some way of doing format strings?

thanks

=[address] & ", " & [city] & ", " & [state] & " " & [zip]
 
M

Marshall Barton

Simple question in making a report.

I have 4 fields address, city, state, zip. In my report I have a text
box. I would like to combine the fields into the correct format:

Yadi Street, fountain valley, ca 92708

But I dont know how to do the combine. Do I need to use seperate text
boxes? that seems stupid. Is there some way of doing format strings?


The concatenation operators & and + can be used to do that.
The difference between them is that & supresses Null values
while + propogates Null values. In your case, I think you
may want to use a mix of the two. Use a single text box
with an expression like:

=(address + ", ") & (city + ", ") & state & " " & zip

The + will suppress the associated ", " when the
corresponding field has no value (i.e. it's Null).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top