Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2006, 04:55 AM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report Problems

Hi All Again
I have a report run based on a query. What I wanted to do was to give the top ten for each record totals.When I changed the query to show the top ten records only one record with its top ten appears in the report. Is there any way around this
Thanks

Brendan Bartley
__________________
Brendan Bartley
 
Old June 8th, 2006, 06:49 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   As we learned from kindler yesterday:

"What you're looking for is actually a very easy query..."

"SELECT FirstName, LastName, Details.ID, MAX(DatePart("yyyy",[DatePaid])) AS LastPayment
FROM Details LEFT JOIN Payments ON Details.ID = Payments.ID
GROUP BY FirstName, LastName, Details.ID, Payments.PaymentDescription
HAVING (((Details.LastName) Is Not Null) AND (LastPayment<2006) AND ((Payments.PaymentDescription)="membership"));

Please note the syntax:

SELECT [fields], MAX(criteria)
FROM [table]
...

Do you need further assistance? If so, post your current SQL statement.

HTH



mmcdonal
 
Old June 8th, 2006, 08:09 AM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried the code and looking ok at present
Thanks

Brendan Bartley





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with single page excel report psoma.cse J2EE 0 January 22nd, 2008 04:07 PM
report problems mohiddin52 Access VBA 5 August 27th, 2007 06:45 AM
Report Problems Brendan Bartley Access 0 February 21st, 2007 07:08 AM
Problems refreshing Report dllorca ASP.NET 2.0 Professional 0 November 13th, 2006 05:49 AM
Data Report problems jeffcflam Pro VB 6 0 June 22nd, 2006 01:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.