Yau,
You are joining to the whole table fheader. If fheader contains more than one row, you may be getting a lot more data pulled into the query than you need. If you want a single fheader.custcode to be evaluated in those queries, you should pull the value out to a memvar:
lnCustCode = fheader.custcode
select ...
where ... = m.lnCustCode
>The fheader.custcode is actually a field of the currently selected table.
>As for the tarmast, you're right, I should have it removed.
>Will let you know the result.