J
Jason Lopez
I have a query that I am working on. However, I don't want to hard code all
of the conditions into the one expression. Instead I would like to somehow
have a IIf statement that will refer to a table that would have the various
conditions and the appropriate response that the IIf statement should spit
out. So essentially something that would look perhaps something like this:
IIf ([ProjectName] Like
"*"+[tbl_compare].[cond]+"*",[tbl_compare].[response],0)
So if I had the table filled like this:
[Cond],[Response]
Bake, Cook
Cold, Refrigerate
Salmon, Fish
Then, when the query would search the project name a find an instance of
"Cold" anywhere in the name, it would return the response of "Refrigerate."
I hope this has been clear enough for someone to help.
Jason
of the conditions into the one expression. Instead I would like to somehow
have a IIf statement that will refer to a table that would have the various
conditions and the appropriate response that the IIf statement should spit
out. So essentially something that would look perhaps something like this:
IIf ([ProjectName] Like
"*"+[tbl_compare].[cond]+"*",[tbl_compare].[response],0)
So if I had the table filled like this:
[Cond],[Response]
Bake, Cook
Cold, Refrigerate
Salmon, Fish
Then, when the query would search the project name a find an instance of
"Cold" anywhere in the name, it would return the response of "Refrigerate."
I hope this has been clear enough for someone to help.
Jason