Steve,
You might want to put a wait window right before that line to show you the values of OMDIDX and OMDID1 - 6 to be sure they are what you think they are.
Also, you might simplify the code a bit by assigning the value of &OMDIDX to a var first to avoid multiple macro expansions:
SomeVar = &OMDIDX
IF Somevar = &OMDID1 OR Somevar...