If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Need help with Access Query

Ok, it took me 20 minutes just to figure out how to start a darn post in here! If this is not the right location for this, please forgive me. I am going to bang my head on the wall real soon if I don't get my issue resolved. Please see my attachment for table sample. My table is named 201299 ALL RECORDS

ID is my primary key column and it autonumbers the records. EEID is a person, and there are many records per one person. DR is a debit entry for that person, CR is a credit entry for that person.
Is it possible to run one or both of the following queries?
1) A query that returns to me matching records(matching means where the debit equals the credit for a person). If the query ran on attached table, it should return to me records (beginning with ID number): 1, 3, 5, and 6. "First come first match(if there are two matching CR values it should return to me the earlier date CR match").....
2)A query that returns to me the opposite of what I defined in 1). A query that returns to me UNMATCHED records. If run on the above table, the query should return to me records 2, 4, and 7.

Users who have thanked Old Pedant for this post:

THank you so much for your effort so far! I would use code but I may need some help understanding where to put it. I have dabbled lightly with SQL but not ASP so that would be completely new to me.
Let me just give you a quick background on this data-I am an accountant and I am trying to do a clearing account reconciliation in Access because at the moment we have no reconciliation software for it. I am really trying to do more with Access than it is meant to do
I ultimately need to have a query that shows me all the records that do not match, so maybe we should focus our effort there only. (Perhaps it would be easier than the match query anyway). Using your data as an example, I would love to write a query that would return to me records 2, 7, & 9.
I look forward to your response!

Non-match is, unfortunately, just as hard as match. Well...maybe not. Hmmm...If you don't really care *WHICH* entries matched, then all we need to do is find CR and DR that have no possible match. Hmmm...

Yes, I think we can do that.

Let me play with it...Ugh! Almost got there and then realized I wasn't detecting the case when there were, say, 2 more CR's of 30 than there are DR's of 30. I was only handling the case where there is only on mismatch. Double ugh. Not an easy problem.