Gaaah, I worked it out. :o) When I executed the command, I needed to put the variable I was after (the one that was picked up by whichTable) into quotes! Works nicely now! Steve _________________________________________________________________ Share what Santa brought you https://www.mycooluncool.com