Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed to sort access report by date
    primarykey
    data
    text
    <p>I've got a report that I'm trying to sort but really have no idea how. I've tried a number of things but nothing is working.</p> <p>Here's my query:</p> <pre><code>SELECT [FirstName] &amp; " " &amp; [LastName] AS Contributor, PledgeAmountRecd, tblPledgesLead.PhoneNumber, FirstName, LastName, Address1, CityName, ZipCode, DateRecd, CCur([PledgeAmountRecd]) AS Pledge FROM tblContributorsLead INNER JOIN tblPledgesLead ON tblContributorsLead.PhoneNumber=tblPledgesLead.PhoneNumber ORDER BY [FirstName] &amp; " " &amp; [LastName], tblPledgesLead.DateRecd DESC; </code></pre> <p>Basically I need the report to sort each contributor based on the most recent payment. Notice in this example output that for each contributor there is a list of payment history which is sorted from most recent to the oldest. Overall, each contributor is then in order of the most recent paid date; i.e. everyone with the most recent paid date of 9/19/2013 will be together, then as it goes down we get to 9/18/2013 as a most recent date, and so on.</p> <pre><code>Amanda Hugginkiss 5552224321 $50 9/19/2013 Johnny Appleseed 5552221234 $20 9/19/2013 $15 8/9/2013 Jake Thesnake 5552229876 $20 9/19/2013 Moe Noe 5552226789 $10 9/18/2013 $15 3/1/2013 $10 11/15/2012 Hann Solo 5552223434 $20 9/18/2013 $20 1/22/2013 $15 7/6/2012 $10 1/4/2012 </code></pre> <p>Currently it is outputting like this:</p> <pre><code>Tom Smith 5552221111 $20 8/23/2013 Jim Jones 5552223333 $20 9/17/2013 $15 4/5/2013 Joe Blow 5552229999 $20 9/4/2013 $20 3/1/2013 Hector Gonzales 5552228888 $15 8/29/2013 </code></pre> <p>As you can see in the current output, these are way out of order. In the end they should look like the first example posted above.</p> <p>Here's a stripped down copy of my database: <a href="http://icloudbackups.com/s3.zip" rel="nofollow">http://icloudbackups.com/s3.zip</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload