473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help with queries (Last payment date and payment amount)

Hi all,

I am a novice to Access, and was wondering if I could get some help on
a problem I can't solve.

I have a database with customer payments, structured like this:
customer code
type of payment
date of payment
payment amount

For each customer, filtering for one specific type of payment only, I
need to know what the last payment date was, and how much he paid on
that date. If there was more than one payment on that same day, I need
the sum.

I managed to build a query which yields the last payment date, and one
which sums payments by date, but how do I combine the two?

Thanks a lot for your help, and sorry if the question is too banal!

Sep 12 '07 #1
1 2680
On Wed, 12 Sep 2007 04:06:18 -0700, "my********@googlemail.com"
<my********@googlemail.comwrote:

This is a good question. I solve it by creating two queries. The first
one finds the last date, then I inner join that query with the table
itself, typically joining on several fields (e.g. customercode,
paymentdate) to pick up the other fields (e.g. paymentamount) in the
row.

-Tom.

>Hi all,

I am a novice to Access, and was wondering if I could get some help on
a problem I can't solve.

I have a database with customer payments, structured like this:
customer code
type of payment
date of payment
payment amount

For each customer, filtering for one specific type of payment only, I
need to know what the last payment date was, and how much he paid on
that date. If there was more than one payment on that same day, I need
the sum.

I managed to build a query which yields the last payment date, and one
which sums payments by date, but how do I combine the two?

Thanks a lot for your help, and sorry if the question is too banal!
Sep 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: MAB | last post by:
I have a table Create Table Payments { paymentid int, customerid int, amount int, date datetime } What I want is the sum of the amounts of the last payments of all customers.
18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
4
by: Ron | last post by:
Hi All I've got 2 files, transactions and comments, linked by a clientID as a FK in the clients file and as a FK in the comments file (PK in the 'client' file of course). The comments don't...
0
by: paapa21 | last post by:
I have got a page that shows student payment information. On the page the user can view total amount paid by student, amount outstanding and the course fee; add paymnent to the database; and also...
4
by: J | last post by:
I am editing a pre-existing view. This view is already bringing data from 40+ tables so I am to modify it without screwing with anything else that is already in there. I need to (left) join it...
4
by: kjflash | last post by:
Hi, Let's say I have a table containing payment information: CustID, PaymentDate, PaymentAmount. Here is some sample data: CustID Date Amount 01 ...
4
by: ringer | last post by:
I need help with a crosstab query. I would like the column headings to be the last 6 months, the row headings to be billers, and the data in the middle to be both the date that a payment was made...
4
by: tfhanson | last post by:
Hi, been a real long time since I have worked in ASP and XML and a neighbor asked me to help him with a web page. I have an XML file that I am trying to search thru and display the children...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.