<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Doris,</FONT></DIV>
<DIV><FONT face=Arial size=2>sorry but no success :(</FONT></DIV>
<DIV><FONT face=Arial size=2>My report looks like:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Mike Thompson</DIV>
<DIV>
<P> 1. plum 155</P>
<P>2. Ervin Brindza</P>
<P> 1. orange 100</P>
<P>3. Ervin Brindza </P>
<P> 1. apple 80</P>
<P>4. Mike Thompson</P>
<P> 1. orange 40</P></FONT></DIV>
<DIV><FONT face=Arial size=2>even I put the Customer name in <FONT
color=#0000ff>the SumOfAmount's header or in Customer.Name's header
the result is the same :(</FONT></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Thanks for your input</FONT></DIV>
<DIV><FONT face=Arial size=2> Ervin</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=mikedorism@ntelos.net href="mailto:mikedorism@ntelos.net">Mike and
Doris Manning</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">'Access Developers discussion and
problem solving'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> 03 September, 2003 1:32 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] Sort order in
report</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=760453011-03092003><FONT face=Arial color=#0000ff
size=2>Change your sort order in the report to SumOfAmount desc, Customer.Name
to get the result you desire.</FONT></SPAN></DIV>
<DIV><SPAN class=760453011-03092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=760453011-03092003>
<DIV align=left><FONT face=Arial size=2>Doris Manning</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Database Administrator</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Hargrove Inc.</FONT></DIV>
<DIV align=left><FONT face=Arial size=2><A
href="http://www.hargroveinc.com">www.hargroveinc.com</A></FONT></DIV></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> <A
href="mailto:accessd-bounces@databaseadvisors.com">accessd-bounces@databaseadvisors.com</A>
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Ervin
Brindza<BR><B>Sent:</B> Wednesday, September 03, 2003 7:26 AM<BR><B>To:</B>
AccessD@databaseadvisors.com<BR><B>Subject:</B> [AccessD] Sort order in
report<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>I need a little push to finish my report.
I have 3 tables: Customer(Id, Name), Order(Id - the customer's Id, KeyFld -
AutoNumber field, linked to the table OrderDet), OrderDet(KeyFld, Id -
ordered item's Id, ItemName, Amount)</FONT></DIV>
<DIV><FONT face=Arial size=2>The record source of the report
is:</FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=2>
<P>SELECT CUSTOMER.Id, CUSTOMER.Name, ORDERDET.ItemName, ORDERDET.Id,
Sum(ORDERDET.Amount) AS SumOfAmount</P>
<P>FROM CUSTOMER INNER JOIN (ORDER INNER JOIN ORDERDET ON ORDER. KeyFld =
ORDERDET.KeyFld) ON CUSTOMER.Id = ORDER.Id</P>
<P>GROUP BY CUSTOMER.Id, CUSTOMER. CustName, ORDERDET.ItemName,
ORDERDET.Id;</P>
<P>And I want to list the customers along with their ordered items, but in
descending order on the sum of amount they ordered(the ordered items are
listed desc and that is ok). In the report's View/Sorting and grouping
I put CUSTOMER.Name and SumOfAmount desc and I get customers listed by their
name :(</P>
<P>So, my report looks like:</P>
<P>1. Ervin Brindza</P>
<P> 1. orange 100</P>
<P> 2. apple 80</P>
<P>2. Mike Thompson</P>
<P> 1. plum 155</P>
<P> 1. orange 40</P>
<P>but I want Mike Thompson to be listed first(he ordered 195) and after
came Ervin Brindza(who ordered 180)</P>
<P>Hope I was clear enough.</P>
<DIV><FONT face=Arial size=2><FONT size=3>
<P>Can anyone shed any light</FONT> please?</P>
<P>TIA,</P>
<P> Ervin</FONT></P></DIV></FONT></FONT></DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BODY></HTML>