Terry,
Good ideas but I have already done all that. My reindex routine deletes the tags and recreates them manually. The real clincher is that the very same line of code works(ed) in other places in the program on the same machine. We reinstalled the runtimes, and did an update on the exe file so that everything was new except the actual dbf file. The problem still occured. We had the customer do a backup and download it here. We installed the backup on a Win2000 machine. Same problem. I installed it on a Win98Se test machine. Worked like a charm. I changed the code from 'set order to tag recnum' to 'set order to tag 4' and it worked on all machines. I have now renamed the index so this problem should go away, but IT IS JUST TOO ARBITRARY! We are supposed to be dealing with zeros and ones not zeros, ones, and question marks.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!