>A question since Brien answered your question - why is "SET ORDER TO main" being used? The conditional statement has been evaluated and the last line is selecting a different Alias(). Is the Main index a part of the previous table or?
Yes, I have four tables and use all indexes as MAIN (along with other indexes for whatever reasons), that way I know and also I have a looping program that opens all tables at once, thus, MAIN is the name.
Today is tomorrow's yesterday.