If the project number has several debits and credits then that won't be an appropriate key. You need to somehow determine explicitly which credits belong to which Debits. For a record like this there would be no query that would separate them:
---------------------------------------
Project# Debit Credit
123 10.50 5.50
123 10.50 5.00
123 10.50 4.50
123 10.50 6.00
---------------------------------------
Implicitly we can determine there are two transactions here but without being able to determine this explicitly your code/database/form won't be able to differentiate between them. You need a field that will explicitly separate these in some way. Perhaps a date field, or a field that specifies an order number or invoice number that would be different between the two debits done for that project #. If you're sure the two debits will never be the same you COULD differentiate based on project number and the debit amount but this isn't a good assumption.
|