How I can get only last date order for all customers listed in report?

haris

Registered User.
Local time
Today, 10:31
Joined
Feb 12, 2002
Messages
13
Hello!
I have a next problem. I would like make report which contain list of CUSTOMERS with more ORDERS. I have next fields:
- CUSTOMER
- ORDER (AMOUNT)
- DATE.
I wish make a list for all CUSTOMERS but only last ORDER for each of them (specified in DATE field).

I will be very gratefull for help.
Thank you,
Haris
 
see my reply under the same topic in forms. It's best not to post the same topic under different headings, it annoys people! If you're not sure where it should go, put it under General
 
Hopefully someone can come up with an easier way, but one way is:

Creat a query showing CustomerID and Order Date. Make it a totals query grouping on CustID and Maximum of OrderDate.

Creat a second query where you have 2 tables in the design grid being Query1 and the orders table. Link by customerID and date, choose customer and date from query 1 and then take the order details from the second table. Make this table a Totals query grouping on CustomerID and OrderDate and making the order details Max. This is because if the last order for a customer was eg 22/4/02 and they made 4 orders that day you would get all 4. By making it totals you only get one.

HTH and that someone can do it better!
 

Users who are viewing this thread

Back
Top Bottom