Finding 'Last' record in a query

D

DAngelia

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!
 
O

Ofer

Try this instead to get the last record

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