About the only way you're going to prevent users from writing malformed queries is to prevent them from running any query except approved queries.
Now, if they are using the same query often and it doesn't have an index to use, I would suggest creating the index.
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.