A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access Query: get first date field



 
 
Thread Tools Display Modes
  #1  
Old June 27th, 2008, 01:47 AM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 25
Default Access Query: get first date field

I am using Access XP.

I am working with a database with many file numbers.

Each file number has multiple paid dates.

How do I get the query to pull each unique file number, and then
just the most recent paid date for that file number?
  #2  
Old June 27th, 2008, 02:10 AM posted to microsoft.public.access.queries
Rob Parker
external usenet poster
 
Posts: 701
Default Access Query: get first date field

Use a totals query. Group by FileNumber, and select Max for PaidDate. The
SQL will be something like:

SELECT YourTableName.FileNumber, Max(YourTableName.PaidDate) AS
MostRecentPaid
FROM YourTableName
GROUP BY YourTableName.FileNumber;

HTH,

Rob

wrote:
I am using Access XP.

I am working with a database with many file numbers.

Each file number has multiple paid dates.

How do I get the query to pull each unique file number, and then
just the most recent paid date for that file number?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.