Query problem - Yes/No field and IIF Statement

  • Thread starter Thread starter Tim
  • Start date Start date
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
 
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])
 
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

.
.
 
Back
Top