When using a SELECT statement, the conditions are checked sequentially. You should sort them with the highest probability of success first and then in decending order. The last case statement should be "case 1". This case statement is always true. Therefore, you can catch any condition that was not trapped above. It is good for error handling when an unknown condition is uncovered.

See WimQuery in the UDF library. I know it now has a case 1 in it. You can see how it is used.

[ 19. November 2002, 17:49: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/