concatenation multiple columns, & removing phrase and replacing wi

  • Thread starter Thread starter Tina S
  • Start date Start date
T

Tina S

I have a feeder she that separate comments over multiple columns. I had
written a query that combines all the comments together in 1 column using &.

The problem is some of the columns contain the phrase, "Question Not Asked".
I would like to replace this phrase wherever it occurs with a space or n/a.
 
just use iif

iif(columnname1 = "Question Not Asked", " ", columnname1) & " " &
iif(columnname2 = "Question Not Asked", " ", columnname2) ... etc ...

and if you want n/a rather than a space

iif(columnname1 = "Question Not Asked", "N/A", columnname1) & " " &
iif(columnname2 = "Question Not Asked", "N/A", columnname2) ...
etc ...

the iif statement works like the excel if
iif(condition,result if condition is true, result is condition is
false)

hope this helps

regards
kelvan
 
In Criteria, I put, IIf("Q2_1"="Question Not Asked","N/A","Q2_1"). When I do
this, i get not results.
I also tried, IIf([Q2_1]="Question Not Asked","N/A",[Q2_1]). I get no
results.

I the put it in the Field row and it worked!! Thanks so much!!
 
Back
Top