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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last record in subset query. 1

Status
Not open for further replies.

marty581

Technical User
Jun 23, 2000
2
US
I need help with a query that will give me the record containg the first date prior to a specified date. It seems that using the < date criteria limits the data to the correct subset of records but then trying either first or last gives me the first or last record written regardless of the date.
 
Yes that is correct MoveLast is a pointer in a relation database.<br>If you want the first record to be the Most recent date then sort the data by your Date, Descending so the Todays date will be at the top and yesterdays next.<br>Then MoveFirst so you are at the top. <br>or MoveLast you will be at the oldest date from today.<br><br>OK <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Try using MAX instead of LAST <p>Jim Conrad<br><a href=mailto:JimConrad@Consultant.com>JimConrad@Consultant.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top