Reputation: 21
I've found a couple answers that are similar to my situation, but I can't seem to adapt them.
I have a form in which people can enter either a Ship To or a Sold To number (two different columns) and then notes. Only a select few of either type will have notes but all records will need to return as part of a larger query. I want to establish a hierarchy with respect to the notes. Basically:
Is that sufficiently clear? I'm pretty sure I should use the IIf function for this, but I'm not sure beyond that.
Upvotes: 2
Views: 88
Reputation: 123819
IIf()
would do it, but Switch()
would be a bit more compact. Try something like this:
Switch(Not IsNull([Ship to]), [Ship to notes], Not IsNull([Sold to]), [Sold to notes])
For more information on Switch()
, look here.
Upvotes: 1