View Single Post
Neilk Neilk is online now
Registered
 
Join Date: Feb 2000
Location: Dallas, TX
Posts: 4,612
Access SUM query help... please

Hi,

How's this for off-topic? I am trying to run a query in Access in which I want to get the latest balance on an account based on posting date

ImportID Amount PostingDate Balance
2 -41066.62 10/17/06 -12.4
3 -105495.18 10/20/06 22.4
1 0 10/20/06 22.4
4 -22.4 10/31/06 0

So I setup a sum query and have no problem getting the Max Date however, I can't get the balance corresponding to that date to appear. When I select First Balance, it selects the first account Imported (importID), when I select Max it gives the me highest number balance (22.4) and when I select Min it will give me the lowest number (-12.4.

Any tips on getting the balance for the latest posting date? Do I have to create two queries? One to pick the latest posting date and a second to tie that max posting date and importID to the balance?

Any help would be appreciated.

Thanks,
__________________
Neil
'73 911S targa
Old 01-05-2007, 08:14 AM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #1 (permalink)