How to concatenate a Yes/No column?

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.
 
C

Clifford Bass

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
 
J

John W. Vinson

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?
 

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