I think you are close to understanding, but there are probably to many formulas to post, maybe I will try to clarify a bit.
I have a Job that runs for say a two year period. My report runs on a specified week enter through a prompt. I need to pull several fields to get charges made this week tied to a cost code and a transaction type.
OK, now, after I have that, one of the calculations I need to make requires that I use an "estimate" amount that was entered at the beginning of the job and tied to the base cost code xx-xx-001.
So, if in the first conditional search that runs from 5-19-07 thru 5-26-07 I find that one of the cost codes that had a charge against was 25-11-360, I need to take that cost code (that was used in that week span) and find the cooresponding estimate cost code 25-11-001 that could have been a year or so earlier. I cannot pull ALL cost codes ending in 001 because only a few may have had charges that one week.
I hope that clears it up a little bit, if not, maybe I can try to post the relevant formulas.
Thanks, Mike