Hi webdevop,
If I understand correctly then you can use your own functions in a query in the same way as you use built in ones.
In the criteria line just enter =YourFunction(YourParam, YourNextParam) or similar.
In the BUILD interface, in the left hand column expand Functions then select your database; then in the middle column select the module you want and in the right hand column will be a list of available functions.
Enjoy,
Tony