Hi,
Found the problem. "P"$alias.fieldname requires an "=" in front of it in VFP9 but not in VFP7.
In VFP9 "P"$alias.fieldname is saved in the memo as Filter =""P"$alias.fieldname" whereas adding the "=" it is saved as Filter = ("P"$alias.fieldname).
The "=" stops it from being treated as a string literal.
Regards N Mc Donald