Considering Pervasive doesn't directly support UDF (if they are User Defined Functions), you're right that this isn't related to Pervasive.
Are you able to run the query in the PCC directly? If so, is it slow? If not, then there's something else causing the problem.
One thing you might try doing (since you're using AND clauses) is rearrange the order of the restrictions. Make sure that it's searching on the one with the fewest matches first. Also, make sure that the fields are indexes and the DDF/Data files pass a consistency check.
__________________
Mirtheil Software
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.