Finding 'Last' record in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used the following to get the last record from a query. I want to get the
last record entered by date. I do not get the last record.

I used this in the FIELD query grid --
X: DatePart("yyyy",[YourDateField])&DatePart("m",[YourDateField])

I used this as Criteria in the query grid --
DatePart("yyyy",Date()-Day(Date()))&DatePart("m",Date()-Day(Date()))

Pleae help!
 
Try this instead to get the last record

Select Top 1 TableName.* From TableName Order By YourDateField Desc
 
Back
Top