Writing a Query

  • Thread starter Thread starter Bridget Stacy
  • Start date Start date
B

Bridget Stacy

I import records into a database at the end of each
month. There is a field that lets me know what month the
record was imported. One of the other fields in the
database is the Advertiser name. I want to write a query
that will extract all Advertisers and the last date they
were imported into the database. I know how to write a
duplicates query, but not how to display the most recent
date of the record. Can anyone help?
 
1. Create a query into this table.

2. Depress the Total button on the toolbar (upper Sigma icon).
Access adds a Total row to the grid.

3. Drag the AdvertiserID field into the grid.
Accept Group By in the Total row.

4. Drag the date field into the grid.
In the Total row, choose Max.

The query groups the records by the advertiser, and returns the most recent
date for each.
 
Thank you - this was perfect!

-----Original Message-----
1. Create a query into this table.

2. Depress the Total button on the toolbar (upper Sigma icon).
Access adds a Total row to the grid.

3. Drag the AdvertiserID field into the grid.
Accept Group By in the Total row.

4. Drag the date field into the grid.
In the Total row, choose Max.

The query groups the records by the advertiser, and returns the most recent
date for each.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.



.
 
Back
Top