How to concatenate a Yes/No column?

  • Thread starter Thread starter Megaton
  • Start date Start date
M

Megaton

Hello

I am trying to concatenate three columns (A, B and C?, C? is a yes/no
column) and display the result like this:
if C=true then select "C" & "A" & "B"
else select "A" & "B"
I don't know what the proper syntax is. Is there a way to do this in the row
source of the list box/combo box?

Thank you for your help.
 
Hi,

You might want to try something like this:

IIf(C, C, "") & A & B

That will give you a -1 at the start when C is true (-1). If you want
a Yes, use:

IIf(C, "Yes", "") & A & B

Clifford Bass
 
Hello

I am trying to concatenate three columns (A, B and C?, C? is a yes/no
column) and display the result like this:
if C=true then select "C" & "A" & "B"
else select "A" & "B"
I don't know what the proper syntax is. Is there a way to do this in the row
source of the list box/combo box?

Thank you for your help.

Not sure quite what you want. Do you want the literal letter C if the yes/no
field C contains -1 (True), followed by the contents of the fields A and B? Or
do you want a text string "CAB" or "AB" depending on the contents of C? Or are
A and B also yes/no fields?
 
Back
Top