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  

Need to find latest date in a query



 
 
Thread Tools Display Modes
  #1  
Old June 27th, 2008, 11:35 PM posted to microsoft.public.access.queries
DPCpresto via AccessMonster.com
external usenet poster
 
Posts: 2
Default Need to find latest date in a query

My query has two fields [prop_id] and [comsdate] where the comsdate field is
a date that periodic, recurring maintenance was done on a certain property.
In some instances, the property is listed twice because I had used a criteria
of = 1/1/2008. My problem is that i want the query to list all properties
that I manage, but, in those instances where the property may show twice, I
only want the LATEST date to show in the query. I then use these results to
schedule the next time maintenance needs to be done by using [comsdate]+120.
I just can't seem to get the multiple listings out.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1

  #2  
Old June 28th, 2008, 12:08 AM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Need to find latest date in a query

Have you looked at using a "Totals" query, Grouping By [prop_id] and using
Max for [comsdate]?

Regards

Jeff Boyce
Microsoft Office/Access MVP


"DPCpresto via AccessMonster.com" u44264@uwe wrote in message
news:8652057466112@uwe...
My query has two fields [prop_id] and [comsdate] where the comsdate field
is
a date that periodic, recurring maintenance was done on a certain
property.
In some instances, the property is listed twice because I had used a
criteria
of = 1/1/2008. My problem is that i want the query to list all properties
that I manage, but, in those instances where the property may show twice,
I
only want the LATEST date to show in the query. I then use these results
to
schedule the next time maintenance needs to be done by using
[comsdate]+120.
I just can't seem to get the multiple listings out.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1



  #3  
Old June 28th, 2008, 12:09 AM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Need to find latest date in a query

Use a Totals query and change the group by below the [comsdate] field to Max.
--
KARL DEWEY
Build a little - Test a little


"DPCpresto via AccessMonster.com" wrote:

My query has two fields [prop_id] and [comsdate] where the comsdate field is
a date that periodic, recurring maintenance was done on a certain property.
In some instances, the property is listed twice because I had used a criteria
of = 1/1/2008. My problem is that i want the query to list all properties
that I manage, but, in those instances where the property may show twice, I
only want the LATEST date to show in the query. I then use these results to
schedule the next time maintenance needs to be done by using [comsdate]+120.
I just can't seem to get the multiple listings out.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1


 




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 06:33 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.