I have an update query that converted a field location from a LETTER NUMBER NUMBER LETTER entry to the word "STORES". This worked perfectly, until the plant added new locations. The new locations are LETTER NUMBER NUMBER NUMBER LETTER entries. This seems simple enough.
Code:
IIf([FROM LOCATION] Like "?##?","STORES",IIf([FROM LOCATION] Like "?###?","STORES",[FROM LOCATION]))
No matter WHAT I have tried, the X###X with three digits in the middle will NOT update. I have tested the IIF with it in both locations, the 2 digit works no matter where, the 3 digit does not. I went back to just the original query, and tried to do just the 3 digit entries - no luck.
I have tried replacing the "?" with [a-z], using underscores, using nothing but "?" - and it HATES ME!
This has to be simpler than it is letting on, but I cannot find the solution. I have spent hours making sure the IIF works properly, and thanks to many entries on this forum, I think it does. It's just the 3 digit update that does not.