Why you not try this in VFP:
SELECT IIF(tocompany<>' ',tocompany,toname) FROM datafile;
WHERE (datafile.tocompany<>' ') OR (datafile.toname<>' ');
INTO CURSOR Testmerge
IF RecCount("TestMerge") # 0
Do your Code
ELSE
Do Code W/o reords
ENDIF
USE IN TestMerge
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.