Query problem - Yes/No field and IIF Statement

T

Tim

I am somewhat new to Access and I am having trouble with
a query. I have a table with a yes/no field and a memo
field. I want to create a query that will scan the
yes/no field and return the text "No Response" if the box
is checked as Yes. Otherwise, it should return the value
of the memo field. It seems to me that an IIF statement
would do this, but I can't get it to work. Any
suggestions?

Thanks for your help,

Tim
 
J

jmonty

Create a new query, add you table with the fields
YN_field = your Yes/No Field and
Memo_field is self-explanitory
Resp = Response (shortened here to avoid wrapping

Enter the following replacing the field names with yours.
(In the row labelled Field:)
Resp: IIF([YN_Field] = True, "No Response",[Memo_field])
 
T

Tim

Thank you very much. I was putting the IIF statement in
the wrong place. Your solution works perfectly. Thanks
again.
-----Original Message-----
Create a new query, add you table with the fields
YN_field = your Yes/No Field and
Memo_field is self-explanitory
Resp = Response (shortened here to avoid wrapping

Enter the following replacing the field names with yours.
(In the row labelled Field:)
Resp: IIF([YN_Field] = True, "No Response",[Memo_field])
-----Original Message-----
I am somewhat new to Access and I am having trouble with
a query. I have a table with a yes/no field and a memo
field. I want to create a query that will scan the
yes/no field and return the text "No Response" if the box
is checked as Yes. Otherwise, it should return the value
of the memo field. It seems to me that an IIF statement
would do this, but I can't get it to work. Any
suggestions?

Thanks for your help,

Tim

.
.
 

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