Help.Query update fields 07

reddogheat

New member
Local time
Today, 07:11
Joined
Mar 19, 2009
Messages
4
I dont know if this is possible but:
I have a Query running from a linked table.
The query has a field called "binding" which is populated with "p" or "h" or nothing.
I wish to replace the "p" with paperback and the "h" with hardback either in the binding field or into a new field, each time the query is run.

Thank you in advance.
 
This might be a valid use of nested IIFs because you have only three choices - h, p, or nothing. Look up the IIF function.

It might look like this:

IIF ([binding] = "p", "paperback", IIF ([binding] = "h", "hardcover", "" ) )

In English this reads: If binding is P then use paperback but if binding is H then use hardcover but for binding equal to anything else use an empty string.

NOTE: You could make this more efficient if you knew which one was more likely between P and H and test for the more likely case first.
 
Thanks Doc Man..that worked well.
Cheers Phin
 

Users who are viewing this thread

Back
Top Bottom