update ... grouping ... replace ????

J

jer

Pymt No. txr ref dr cr
34567-1 25 20628941 130.00
24685-1 32 20628941 100.00
34567-1 30 20628941 20.00
24685-1 29 20628941 10.00
34567-1 24 20628942 100.00
24685-1 32 20628942 100.00

I have inherited a database structured as above, a transaction may have
as many as 4 entries (records) however the ref will be the same, I need to
count the number of transactions where the txr is 25 (simple enough) and sum
the corresponding cr for these transactions (where the txr = 32). Here I
having some difficulty because there are other transactions where the txr for
the cr is 32 and not related to a txr 25 for the dr. So the result of the
above is 1 transaction for a total of 100, hope this is clear
With some work I can do this in excel, however because of the size of the
database
I am trying to do this in access.
Any help/suggestions would be greatly appreciated
 
R

Ron

Need to see some of the Transactions where the txr for
the cr is 32 and not related to a txr 25 for the dr.
 
J

jer

Thanks Ron for your response the last 2 records are the an example of what
you are asking for - ref 20628942 dr txr = 24 and cr txr = 32
 
R

Ron

I am still confused. There is a txr = 25 with ref 40628941 with a dr of 130
AND a txr of 32 for ref 20628941 with a cr = 100.
Next we have a txr of 24 for ref 20628942 with a dr = 100 and a txr of 32
for ref 20628942 with a cr = 100.

Is what we have a txr maybe 25 or 24 with a single ref and a txr of 32 with
that same single ref where the cr does not have to = the dr?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top