Joining many fields using Iif is null

Ramzess II

Registered User.
Local time
Today, 12:15
Joined
Apr 7, 2004
Messages
32
Greetings.

I can't understand how to do this most likely simple thing:

I have a query, based on table, where I have 7 fields for entering address, like
street, city, parish, county, post office, zip & country.

For many records some of those fields will be empty, like
Brown street, Moscow, -, -, -, T32 42G, Russia.
Black street, -, Oak parish, -, Sun post office, 34244, -.

What I need is to make a additional field in this query, where all those address fields are joined and each value is seperated by comma, of course by escaping null values.

I know how to make it work if there is only one field containing null
but how to make it work with so many possible null values?

Could anyone help me on this?

Thank you in advance.
 
Thank you. Nz function... but how? Can you give me an example?
Should I use it in the expression in query?
 
There's no point in doing this in the query, do it at form/report level
=[Field1]&","& " "& Iif(IsNull([Field2], " ",[Field2]&",")) etc.
 

Users who are viewing this thread

Back
Top Bottom