Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date limitation

Status
Not open for further replies.

cel

Programmer
Sep 20, 1999
3
US
In Access 95 what would one use as a criteria to limit the hits to the most recent date?<br>
Thanks!
 
In a query put this in the &quot;Criteria&quot;<br>
[Enter Date]<br>
in your date field.<br>
Run your query and type in a date like 1/1/2000<br>
Now it will only show records if they match the exact date.<br>
<br>
or enter this in the date field<br>
Between [Enter Start Date] and [Enter End Date]<br>
It will ask 2 questions and show records in between 2 dates you type in.<br>
If you want to see the dates in order put &quot;Descending&quot; in the sort box and it will put the most recent date at the top.<br>
&quot;Ascending&quot; just the opposite<br>
<br>
<br>

 
Have you tried DMax-function?<br>
<br>
SELECT YourDateField<br>
FROM [YourTable]<br>
WHERE (((YourDateField)=DMax(&quot;[YourDateField]&quot;,&quot;[YourTable]&quot;)));<br>
<br>
Al
 
No Al what does it do?<br>
Find the highest date in a list?
 
Thanks, I know how to limit it to a date range but that could pull up more than one date. DMax is the answer! Thanks very much!!<br>
Chris
 
Access also has a MaxRecord function if you only want one value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top