According this, I think what you are needing is to know how many records are with same date in both files and in BBB->Field02 must be different than zero.

Remembering all command in dBase, I should try this:

Count to Total for (BBB->Date01 = AAA->Date01 .AND. BBB->Field02>0)

I did not teste, so I not sure if gonna works but try and in other cases you can use Count command without any filter (filters normally become having/slow process) and also do not need index files too. But take in count that you need to process up the dbfs files.

IMO, if this information is frequently used, you need to be recorded at same time you are inputing data.

HMGing a better world"Matter tells space how to curve, space tells matter how to move."Albert Einstein