Hi
Your ISB() function always returns .F. You are passing a value which do contain .F. or 0 and therefore are not blank by definition. If you pass the name of the field and change the last line to RETURN ISBLANK(&pfield), you get the desired results.
Why ISBLANK() in the query isn't working properly is something I've to think about. My first though was that VFP is converting the parameter to a value before passing it to ISBLANK(). Trying to do the same with the similar scenario of empty memo fields, however, showed that VFP is using the field here.
--
Christof